> I want to do the following:
>
> $u=preg_replace("/[^$chars]/e",'"%".unpack("H2", "$0")', $u);
>
> However, as you know, unpack returns an array.  I tried this instead:
>
> $u=preg_replace("/[^$chars]/e",'"%".(unpack("H2", "$0")[""])', $u);
>
> but that isn't syntactically correct.  I know that this is possible to
> remedy using a user function but I do this kind of thing very often
> (grab the contents of an array value in one line of code) and want to be
> able to do it without splitting it into multiple lines.  Is that possible?

What exactly are you trying to do? Can you explain it and give some same
strings and output you're looking to achieve?

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to