|
|||
|
||||
yup.. that is a problem when we use single quotes instead of double. urmm.. do we need to escape single quotes when using single quotes? :/
anyway, i don't think using htmlentities() is a perfect choice for this case because it will convert quote to html code, and that is not we want. what if the variable is holding a code for form? so, is there any \"easy\" aproach escaping the quotes in PHP without manually doing it and mess the whole HTML codes with \"escape quote\"? i really miss my qq in perl ![]() |
|
||||
i see.. so that is the only way of doing quote thingy in PHP.
Quote:
second, it really mess out the codes. like when u use visual basic and need to insert a variable using & var & inbetween the string... that is soooooooooooooooo annoying! PHP need to have qq like Perl does. if they can think about htmlentities(), why not move one step ahead and introduce qq... ![]() anyway, i welcome myself to the world of PHP.. and my first step is to create a macros for auto \" ![]() |
|
||||
PHP Code:
whatever suits you man... im just giving suggestions
__________________
Munzir + "/^[Hh](a)(z)\1\2[iI]$/" |
|
||||
Quote:
Very small, rite. Using \" is faster and easier for NORMAL sentences. Mess out the code? Never have the feeling yet ![]() welcome to PHP world! |
|
||||
itulah maksud aku.... for string
anyway, consider this : i have a form/html codes that i want to use in my code, so in PERL, i just copy part of the needed codes from HTML and paste it into PERL without loosing my hair (just change the value with variable and thats it) : so, with Perl i would write something like this: $myvar =qq~ <center><b>WOHOO</b><br><br>"I want to say something!"<br><br> <form action="modules.php?name=$module_name" method="post"><input type="hidden" name="who" value="$username"><input type="hidden" name="op" value="broadcast"><input type="text" size="60" maxlength="255" name="the_message"> <input type="submit" value="SEND"></form></center> ~; but with PHP... $myvar = "<center><b>WOHOO</b><br><br>\"I want to say something!\"<br><br><form action=\"modules.php?name=$module_name\" method=\"post\"><input type=\"hidden\" name=\"who\" value=\"$username\"><input type=\"hidden\" name=\"op\" value=\"broadcast\"><input type=\"text\" size=\"60\" maxlength=\"255\" name=\"the_message\"> <input type=\"submit\" value=\"SEND\"></form></center>"; that really mess up my code.. i bet u guys will love the qq function in Perl if u do a lot of strings in ur code.i have searched the net and failed to find the answer... i guess i have to email a request to zend people... but they are in Israel, which, of course, I hate... so, i guess i have to live with it. thanx again people. ![]() |
|
|||
|
||||
walalala... dak sowang ni...
Oooo en mahluk asing 3d... angpa paham dok diorang bincang about ape? kalau dok tgk post yg bawah tu jo, tak yo la nyampuk. tapi ikut suka hang la kan? ehhee aler yg form tu, gune je single quote tak leh ke dingdang? yg nak guna quote tu lotakkan je ha slash.. don't lazy˛ lah... yak! yak! selamat hari ghaye!
__________________
I hate when: vBulletin Message: Sorry! The administrator has specified that users can only post one message every 60 seconds |
|
||||
ahaha.... ni musti penin kes makan lemang banyak sangat,.,,,
![]()
__________________
<form name="jump"> <select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" style="border:1px #393F31 solid;color:#393F31;font:10px Verdana;font-weight:bold;" > <option value="0" style="background: #9CC8FE" selected>*SELECT-LINKS</option> <option value="http://www.gengturbo.org/" style="background: #FF0000">GENGTURBO</option> <option value="http://www.phixelgrafix.com/" target="new" style="background: #C6D607">PHIXELGRAFIX</option> <option value="http://dailydigital.phixelgrafix.com/" style="background: #FCBC45">OLD-BLOG</option> <option value="http://www.mesrahosting.net/" style="background: #FF99CC">WEBHOSTING</option> </select> </form> |















