Jump to content

help with strlen function


gammaman

Recommended Posts

string may be a reserved word in PHP. Try naming it something different.

 

Also, what exactly isn't working? You're not echoing anything to the screen.

 

<?php

function checkLen($input)
{
if (strlen($input) >= 6)
{
	return TRUE;
}
else
{
	return FALSE;
}
}

$words = "This is a string.";
echo checkLen($words);
?>

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.