Function strrchr() generates "expecting `T_PAAMAYIM_NEKUDOTAYIM'" error ...
Posted by: kaspencer (---.plus.com)
Date: September 03, 2010 01:00PM

Hello again ...


Running PHP 5.3.0 as part of the Wampserver package, when we execute the following code:

$file_ext = strrchr($file, "." );

we get the odd error "expecting `... T_PAAMAYIM_NEKUDOTAYIM' ...".

I realise that this error indicates that somehow, strrchr () is asking for a classname:: but I am not sure how to supply it, nor what to supply.

Any answers?

Thanks and regards

Ken.

Kenneth Spencer
(SW England, UK)



Edited 3 time(s). Last edit at 09/03/2010 04:34PM by kaspencer.

Options: ReplyQuote
Re: Function strrchr() generates "expecting `T_PAAMAYIM_NEKUDOTAYIM'" error ...
Posted by: stevenmartin99 (---.251.255.14.threembb.ie)
Date: September 03, 2010 03:24PM

&file ?

This should be a variable like $file or $filename

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Function strrchr() generates "expecting `T_PAAMAYIM_NEKUDOTAYIM'" error ...
Posted by: kaspencer (---.plus.com)
Date: September 03, 2010 04:33PM

Sorry Steve, that was my typing error - failing to read my post properly.

In the code in question, I assure you that it is $file, a variable, as it should be.

I will edit my original post just so as to clarify ...

Ken.

Options: ReplyQuote


Sorry, only registered users may post in this forum.