Premium Membership
Subscription graphics design php html youtube
Gold Subscription with Silver access
graphics design php html youtube
Live Support
Contact us by live help [photoshop, website design, tutorials]
Not available on weekends



Javascript in php nuke block explained



Hire Us!Download Video(11)Comments
Need Jobs done? Use our brand new Jobs Board to get your projects done at affordable prices.



This is one of the most asked questions and it's actually one of the easiest things to do. Follow this general rule and you should be ok. The first thing to do is take a look at the codes and see if the amount of double quotes [ " ] exceeds the amount of single quote [ ' ] or vice versa. Like in the example below.

<script language="JavaScript" >
myimages[1]="image1.gif"
myimages[2]="image2.gif"
</script>


By doing a count I see there are 6 double quotes and no single quote which makes this a very easy script to add. What we are going to do is use single quote to enclose the script as seen in the following.

$content = '<script language="JavaScript" >
myimages[1]="image1.gif"
myimages[2]="image2.gif"
</script>';

Notice where the single quotes are, now if the script was the opposite and there were 6 single quotes then we would do the opposite and use double quotes to enclose the script as in the example below.

$content = "<script language='JavaScript' >
myimages[1]='image1.gif'
myimages[2]='image2.gif'
</script>";

I know your next question, what if there are both single and double quotes in the script, well i'll show you how add those. Below is an example script

<script language="JavaScript" >
myimages[1]='image1.gif'
myimages[2]='image2.gif'
</script>

As you may remember from what i told you in the first part of this tutorial which is to see which of the two are more. In this case we have more single quotes [ 4 ] than double quotes [2]. So what we will do is surround the script in double quotes since those are less and use slashes [\] to mark out the double quotes in the script like the following.

$content = "<script language=\"JavaScript\" >
myimages[1]='image1.gif'
myimages[2]='image2.gif'
</script>";

If you were using single quotes then you do the opposite as below.

$content = '<script language="JavaScript" >
myimages[1]=\'image1.gif\'
myimages[2]=\'image2.gif\'
</script>';

I hope this gives you a better understanding but if you have any questions feel free to ask.

That's All! Visit our forums for more help.

 

Hire Us!Download Video(11)Comments
Need Jobs done? Use our brand new Jobs Board to get your projects done at affordable prices.




New Subscribers



Subscriber

coopvet2000

Platinum Subscribers

#1
Subscriber

inthee30zone

Platinum Subscribers

#2
Subscriber

kowalski

Silver Subscribers

#3
Subscriber

MikeMc

Platinum Subscribers

#4
Subscriber

MikeMc

Silver Subscribers

#5




Our Sponsors



Advertise with Western Studios.net
Custom jobs at low cost, free lancers and service buyers.
PHP Nuke themes, stock photos, icons, drupal themes and more.
Horror Movie News


Downloads



Latest in downloads

Most downloaded


Jobs





Community

Western Studios is an award winning website creating website disign and professional php scripts.

Associated Sites

Marketplace Themes, scripts, icons and images

Themes site PHP Nuke themes preview site.