Answers for "php check if string starts with 10 numbers"

PHP
0

Check if a String Starts With a Specified String in PHP

phpCopy<?php
  $string = "Mr. Peter";
  if(strncmp($string, "Mr.", 3) === 0){
      echo "The string starts with the desired substring.";
  }else 
      echo "The string does not start with the desired substring.";
?>
Posted by: Guest on April-23-2021
0

Check if a String Starts With a Specified String in PHP

phpCopy<?php
  $string = "mr. Peter";
  if(strncasecmp($string, "Mr.", 3) === 0){
      echo "The string starts with the desired substring.";
  }else 
      echo "The string does not start with the desired substring.";
?>
Posted by: Guest on April-23-2021

Code answers related to "php check if string starts with 10 numbers"

Browse Popular Code Answers by Language