Pages

Your Ad Here

This Blog is not to read or go through

because, I have never been such a mess


Search the blog instead

Wednesday, May 5, 2010

Nested Quotes problem in HTML PHP

<?php

function sanitize_quotes($string){
    return htmlspecialchars($string, ENT_QUOTES);
}

$url = "Chateau d'Ouchy";
$surl = sanitize_quotes($url);
echo "<a title='<a href=\"{$surl}\" >{$surl}</a>'>Anchor Text</a>";
?>

Tags: PHP, HTML, Web, Internet, Tips and Tricks, Troubleshooting, Howto

No comments:

Your Ad Here