Friday, 15 March 2013

php - Sublime Text 2: Automatically escape quotes -



php - Sublime Text 2: Automatically escape quotes -

using sumblime text 2, there way automatically escape block of html utilize in string or php echo?

when wrapping lots of html in double quotes have escape double quotes, can done command of keybind?

simple example:

<label for="file">filename:</label> <input type="file" name="uploadedfile" id="file"><br />

would become:

<label for=\"file\">filename:</label> <input type=\"file\" name=\"uploadedfile\" id=\"file\"><br />

so can utilize this:

$output = "<label for=\"file\">filename:</label> <input type=\"file\" name=\"uploadedfile\" id=\"file\"><br />"

ofcourse utilize find , replace, since mutual task, can done keybind selection?

why not create utilize of single quote?

<?php $output = '<label for="file">filename:</label> <input type="file" name="uploadedfile" id="file" value="'.$filename.'"><br />'; echo $output; ?>

php html escaping

No comments:

Post a Comment