Search query encoding ampersand

hi,

if i want to look up a product by name, i use this PHP to generate the API url string:

"Item.json?limit=10&description=~,".rawurlencode("%".$search."%");

(i tried plain 'urlencode()' and double encoding 'urlencode(urlencode())' too)

when $search includes an ampersand &, no products are found.

i.e. search for 'B&W Speaker' does not give me a result, but 'W Speaker' does.

any ideas in how to encode a string with & in it properly?

thx!
maarten

1 comment

Sign In or Register to comment.