Answers for "php strom"

PHP
65

php strpos

$myString = 'Hello Bob how are you?';
if (strpos($myString, 'Bob') !== false) {
    echo "My string contains Bob";
}
Posted by: Guest on August-06-2019
0

strcasecmp php

<?php
echo strcasecmp("Hello world!","HELLO WoRLD!");
?>

<p>If this function returns 0, the two strings are equal.</p>
Posted by: Guest on December-04-2020
0

strcmp php

strcmp("5", 5) => 0
Posted by: Guest on November-04-2020
-1

php rtrim

$colors=trim("blue,red,green,",",");//remove last , with rtrim
Posted by: Guest on November-20-2020

Browse Popular Code Answers by Language