Ask a Question related to PHP Development, Design and Development.
-
Carramba #1
how to output semicolon with php
hi! thanx for reading!
my problem: I want to print :
7] Xerox: print '<a href='.
'"javascript:;"'.
"onClick='hideAll(); showHideLayers ('s6','','show')'>
test</a>";
with php
but I can't get it work becouse php ends reading efter ; but I have to have
it printed.. how do I acheff it?
Carramba Guest
-
cfgrid and semicolon bug
This problem was posted way back in 2005 but I have not seen a solution to it. When querying from a database a record that contains a semicolon and... -
Missing semicolon problem
I am getting the error of Missing semicolon at end of SQL statement on the LAST insert of the following code, but I don't know why. <cfquery... -
semicolon requested
Can someone help me on this. I'm trying to insert data into 2 tables using cf defined statements from the insert form wizard. When I run the code in... -
What does a semicolon do at the beginning of a line?
Was browsing the documentation on reading a configuration file and found this. What does a semicolon do at the beginning of a line? ; <?php DO... -
behavior of semicolon on return line
Does the semicolon behave any differently for a return test statement? Example, sub validate { return shift =~ /^*\.+$/ } or sub validate -
MeerKat #2
Re: how to output semicolon with php
Carramba wrote:
I don't think it does. The source of your document will be:> hi! thanx for reading!
>
> my problem: I want to print :
> 7] Xerox: print '<a href='.
> '"javascript:;"'.
> "onClick='hideAll(); showHideLayers ('s6','','show')'>
> test</a>";
>
> with php
>
> but I can't get it work becouse php ends reading efter ; but I have to have
> it printed.. how do I acheff it?
<a href="javascript:;"onClick='hideAll(); showHideLayers ('s6','','show')'>
test</a>
Unless I've completely misunderstood your question.
--
MeerKat
MeerKat Guest
-
Carramba #3
Re: how to output semicolon with php
the output is:
<a href="javascript:;"onClick='hideAll(); showHideLayers('d2','','show')'>
test</a>
I need it to by <a href="javascript:;" onClick="hideAll();
showHideLayers('d2','','show')"> test</a>
now I can't get out pu of " .. eah..
I have tryed
print '<a href='.'"javascript:;"'.'onClick='.'"hideAll();
showHideLayers('d2','','show')"'.'> test</a>';
then I get error : parse error, unexpected T_STRING ...
Carramba Guest
-
MeerKat #4
Re: how to output semicolon with php
Carramba wrote:
Try this:> the output is:
> <a href="javascript:;"onClick='hideAll(); showHideLayers('d2','','show')'>
> test</a>
>
> I need it to by <a href="javascript:;" onClick="hideAll();
> showHideLayers('d2','','show')"> test</a>
>
> now I can't get out pu of " .. eah..
>
> I have tryed
>
> print '<a href='.'"javascript:;"'.'onClick='.'"hideAll();
> showHideLayers('d2','','show')"'.'> test</a>';
> then I get error : parse error, unexpected T_STRING ...
>
>
print "<a href=\"javascript:;\" onClick=\"hideAll();
showHideLayers('d2','','show')\">test</a>";
Notice I've escaped (ie, added \) all the double quotes, except those
around the whole string.
--
MeerKat
MeerKat Guest
-
Carramba #5
Re: how to output semicolon with php
thanx mate!
it worked just fine.. I was trying same thing but wasn't near.. can you
explain why it's works like that?
print "<a href=\"javascript:;\" onClick=\"hideAll();
showHideLayers('d2','','show')\">test</a>";
u start with \ " and finish with \" thought it was like \"somestring"\ ...
its more logical for me.. tag start \ tag ends \ ... hoppe you have time to
explayn so I would need to ask similar qestions...
and thanx again!
"MeerKat" <liquidlaughter2000@blueyonder.co.uk> skrev i meddelandet
news:MRu0b.1550$jK.12925126@news-text.cableinet.net...showHideLayers('d2','','show')'>> Carramba wrote:
>> > the output is:
> > <a href="javascript:;"onClick='hideAll();>> > test</a>
> >
> > I need it to by <a href="javascript:;" onClick="hideAll();
> > showHideLayers('d2','','show')"> test</a>
> >
> > now I can't get out pu of " .. eah..
> >
> > I have tryed
> >
> > print '<a href='.'"javascript:;"'.'onClick='.'"hideAll();
> > showHideLayers('d2','','show')"'.'> test</a>';
> > then I get error : parse error, unexpected T_STRING ...
> >
> >
> Try this:
>
> print "<a href=\"javascript:;\" onClick=\"hideAll();
> showHideLayers('d2','','show')\">test</a>";
>
> Notice I've escaped (ie, added \) all the double quotes, except those
> around the whole string.
>
> --
> MeerKat
>
>
Carramba Guest
-
MeerKat #6
Re: how to output semicolon with php
Carramba wrote:
No problem.> thanx mate!
I'll try... :)> it worked just fine.. I was trying same thing but wasn't near.. can you
> explain why it's works like that?
The \ characters are not tags. They are -not- there to 'start' and 'end'
a piece of text. They are there to say that the next character should be
treated as part of the string and not as anything 'special'. So \" means
that the double quote should be outputted.
I hope this helps.
MK.
--> print "<a href=\"javascript:;\" onClick=\"hideAll();
> showHideLayers('d2','','show')\">test</a>";
>
> u start with \ " and finish with \" thought it was like \"somestring"\ ...
> its more logical for me.. tag start \ tag ends \ ... hoppe you have time to
> explayn so I would need to ask similar qestions...
>
> and thanx again!
>
>
> "MeerKat" <liquidlaughter2000@blueyonder.co.uk> skrev i meddelandet
> news:MRu0b.1550$jK.12925126@news-text.cableinet.net...
>>>>Carramba wrote:
>>
>>>>>the output is:
>>><a href="javascript:;"onClick='hideAll();
> showHideLayers('d2','','show')'>
>>>>>>>test</a>
>>>
>>>I need it to by <a href="javascript:;" onClick="hideAll();
>>>showHideLayers('d2','','show')"> test</a>
>>>
>>>now I can't get out pu of " .. eah..
>>>
>>>I have tryed
>>>
>>>print '<a href='.'"javascript:;"'.'onClick='.'"hideAll();
>>>showHideLayers('d2','','show')"'.'> test</a>';
>>>then I get error : parse error, unexpected T_STRING ...
>>>
>>>
>>Try this:
>>
>>print "<a href=\"javascript:;\" onClick=\"hideAll();
>>showHideLayers('d2','','show')\">test</a>";
>>
>>Notice I've escaped (ie, added \) all the double quotes, except those
>>around the whole string.
>>
>>--
>>MeerKat
>>
>>
>
>
MeerKat
MeerKat Guest
-
Carramba #7
Re: how to output semicolon with php
ok!
know I get it!
thanx!
"MeerKat" <liquidlaughter2000@blueyonder.co.uk> skrev i meddelandet
news:cdv0b.1577$xY1.14518421@news-text.cableinet.net.......> Carramba wrote:
>>> > thanx mate!
> No problem.
>>> > it worked just fine.. I was trying same thing but wasn't near.. can you
> > explain why it's works like that?
> I'll try... :)
>
> The \ characters are not tags. They are -not- there to 'start' and 'end'
> a piece of text. They are there to say that the next character should be
> treated as part of the string and not as anything 'special'. So \" means
> that the double quote should be outputted.
>
> I hope this helps.
>
> MK.
>> > print "<a href=\"javascript:;\" onClick=\"hideAll();
> > showHideLayers('d2','','show')\">test</a>";
> >
> > u start with \ " and finish with \" thought it was like \"somestring"\to> > its more logical for me.. tag start \ tag ends \ ... hoppe you have time>> > explayn so I would need to ask similar qestions...
> >
> > and thanx again!
> >
> >
> > "MeerKat" <liquidlaughter2000@blueyonder.co.uk> skrev i meddelandet
> > news:MRu0b.1550$jK.12925126@news-text.cableinet.net...
> >> >> >>Carramba wrote:
> >>
> >>
> >>>the output is:
> >>><a href="javascript:;"onClick='hideAll();
> > showHideLayers('d2','','show')'>
> >> >> >>>test</a>
> >>>
> >>>I need it to by <a href="javascript:;" onClick="hideAll();
> >>>showHideLayers('d2','','show')"> test</a>
> >>>
> >>>now I can't get out pu of " .. eah..
> >>>
> >>>I have tryed
> >>>
> >>>print '<a href='.'"javascript:;"'.'onClick='.'"hideAll();
> >>>showHideLayers('d2','','show')"'.'> test</a>';
> >>>then I get error : parse error, unexpected T_STRING ...
> >>>
> >>>
> >>
> >>Try this:
> >>
> >>print "<a href=\"javascript:;\" onClick=\"hideAll();
> >>showHideLayers('d2','','show')\">test</a>";
> >>
> >>Notice I've escaped (ie, added \) all the double quotes, except those
> >>around the whole string.
> >>
> >>--
> >>MeerKat
> >>
> >>
> >
> >
> --
> MeerKat
>
>
Carramba Guest
-
haptiK #8
Re: how to output semicolon with php
Hello :)
shouldnt that read more like
echo '<a href="javascript:void(0);" onclick="hideAll();
showHideLayers('s6','','show')">test</a>';
much easier to read... why even echo it at all though?
-jpdr
TTG
Carramba wrote:
> hi! thanx for reading!
>
> my problem: I want to print :
> 7] Xerox: print '<a href='.
> '"javascript:;"'.
> "onClick='hideAll(); showHideLayers ('s6','','show')'>
> test</a>";
>
> with php
>
> but I can't get it work becouse php ends reading efter ; but I have to have
> it printed.. how do I acheff it?
>
>haptiK Guest
-
Carramba #9
Re: how to output semicolon with php
yeah.. why not...
I can't tell you I just use print, becouse echo is like more calling php and
functions etc.. but you are 100% right it's work greate too..
"haptiK" <nospam@nospam.com> skrev i meddelandet
news:bhvc14$g6t$2@titan.btinternet.com...have> Hello :)
>
> shouldnt that read more like
>
>
> echo '<a href="javascript:void(0);" onclick="hideAll();
> showHideLayers('s6','','show')">test</a>';
>
> much easier to read... why even echo it at all though?
>
>
> -jpdr
> TTG
>
> Carramba wrote:
>> > hi! thanx for reading!
> >
> > my problem: I want to print :
> > 7] Xerox: print '<a href='.
> > '"javascript:;"'.
> > "onClick='hideAll(); showHideLayers ('s6','','show')'>
> > test</a>";
> >
> > with php
> >
> > but I can't get it work becouse php ends reading efter ; but I have to>> > it printed.. how do I acheff it?
> >
> >
>
Carramba Guest



Reply With Quote

