PHP 1 Flashcards
1
Q
$name =strlen(“sam”)
What does the function strlen do here?
A
Return length of the name.
2
Q
$myname =”samuel”;
$partial = substr($myname, 0, 3);
what does the function substr do?
A
print string from index 0 - 3.
sam will be printed