/ Published in: PHP

Get the first char of a lastname in php
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $mystring = 'Test Name'; $findme = ' '; // The !== operator can also be used. Using != would not work as expected // because the position of 'a' is 0. The statement (0 != false) evaluates // to false. if ($pos !== false) { } else { echo "The string '$findme' was not found in the string '$mystring'"; } ?>
Comments
