I am trying to take 2 strings, see what length they are, and if one is larger than the other, set it as $phonenumber, and the other as $extension. See below:
if(strlen($temp_ext) > 4)
{
$extension = $temp_cid;
$phonenumber = $temp_ext;
}
else
{
$extension = $temp_ext;
$phonenumber = $temp_cid;
}
This doesn’t look like it works, though. I am still getting 10 digit numbers in extension, and 4 digit numbers in the $phonenumber variable. What am I missing?
Try this
Hope this helps.