isset and string length
Posted: Thu Oct 05, 2006 10:54 am
I was looking though a book today and I found this line:
As of PHP 4.3.10 you can use a little know feature of isset to check to see if a string offset is present.
In there example they have:
But no matter what I try it comes back as false in everything I have tried. Has anyone used this before and is there a trick to it?
As of PHP 4.3.10 you can use a little know feature of isset to check to see if a string offset is present.
In there example they have:
Code: Select all
//$_POST[$k] is an address field
//$v = 255
if (!empty($_POST[$k]) && isset($_POST[$k]{$v + 1})) {
exit("{$k} is longer then the allowed {$v} length");
}