Encoding Ampersands

From: Date: Thu, 29 Jul 2010 04:18:00 +0000
Subject: Encoding Ampersands
Groups: php.general 
Request: Send a blank email to php-general+get-307191@lists.php.net to get a copy of this message
Hello List. I have variables displaying content from mysql fields. The contents contains & like "Dogs & Cats"... so naturally the W3C validator chokes on them. Is there a way to encode so they display properly on the page but the validator is OK with them? Is the answer as simple as: urlencode($myvar) Thanks, --Rick

« previous php.general (#307191) next »