Have you already tried replacing it with escaped sequence piping through sed the output of the command? PHP Code: Nokia-N900-51-1:~# echo "pippo & pluto" | sed "s/&/&/g" pippo & pluto Nokia-N900-51-1:~#
Nokia-N900-51-1:~# echo "pippo & pluto" | sed "s/&/&/g" pippo & pluto Nokia-N900-51-1:~#