3. String Functions II


#1

Hello friends
i have problem with una sentence ,i don't understand .why reason is the problem?

Oops, try again. Your first strpos() call should output a number.
and i don't know how output a number...


<?php
// imprimir la posición de una carta que está en
// su propio nombre
strpos("santiago", "a"); // 5

?>



<?php
// Check for a false value of a letter that is not
// in your own name and print out an error message
if (strpos("santiago","e") == false) {
print "Sorry, no 'e' in 'jahnavi'";
}
?>



#2

<?php 
// imprimir la posición de una carta que está en 
// su propio nombre 
strpos("santiago", "a"); // 5

?>

You have to print that result .

hint**

print..
strpos("santiago", "a");

#3

NO THE PROBLEM IS HERE AGAIN



<?php
// imprimir la posición de una carta que está en
// su propio nombre
strpos("santiago", "a"); // 5

?>



<?php
// Check for a false value of a letter that is not
// in your own name and print out an error message
if (strpos("santiago","a") == false) {
print "Sorry, no 'e' in 'jahnavi'";
}
?>



#4

You have to print this.
I already told you to do?

strpos("santiago", "a");


#5

:frowning: ok i can't do it but thanks you


#6

We print anything in php like this..

$name = "Ryan";
print $name;

#7

for example i have
but in the first strpos Oops,
try again. Your first strpos() call should output a number.
and i can't understand :cry:

if (strpos("santiago","a") == false) {
print $strpos;
}
?>


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.