PHP ZCE mock test, interview preparation, daily lessons under chalk talk

Thursday, January 12, 2012

ZCE Zend Certified Engineer strrpos question solution

View the Complete Blog on ZCE


$foo = 'charanjeet/working/with/php';
echo strrpos($foo, '/', -5);

Answer: 18
It will start searching it reverse direction after ignoring 5 five characters.
It will then return the position of the / after working, from the beginning

No comments:

Post a Comment