Jump to content

String If Statement


AndrewFerrara

Recommended Posts

I need an if statement, but i have no idea how or if it can be done.

 

If a text string is greater than 10 characters, {echo $string}  else{  print $error }

<?php

$string = '1900800008';
$error = 'String isn't long enough';
if(  ?????????  ){echo $string}
else{  print $error }

?>

 

Link to comment
https://forums.phpfreaks.com/topic/225936-string-if-statement/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.