|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-03-11 17:55 UTC] asd at suespammers dot org
Often, I'm left writing things like: <input type="text" name="yada" value="<?php echo htmlspecialchars($var) ?>"> It'd be nice if PHP let you write this instead: <input tupe="text" name="yada" value="<?php $var ?>"> with the echo and htmlspecialchars implied. Or at least the echo implied. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 21:00:01 2025 UTC |
Easily done, write your own function 'h($a) { return htmlspecialchars($a);}', your call could then look like '<?=h($var)?>'