Re: [PHP] Array syntax not covered in documentation

2003-03-12 Thread Marek Kilimajer
maybe implode? $u=preg_replace("/[^$chars]/e","%".implode('',unpack("H2", "$0")), $u); adrian porter wrote: 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]

Re: [PHP] Array syntax not covered in documentation

2003-03-12 Thread CPT John W. Holmes
> 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 th

[PHP] Array syntax not covered in documentation

2003-03-12 Thread adrian porter
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