 |
|
 |
Main Menu |
|
 |
Forums |
|
 |
Programming Contest |
|
 |
Documentation
|
|
 |
Partner
Sites |
|
 |
Sponsors |
|
 |
|
|
Register •
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 2 posts ] |
|
Author |
Message |
stephanie jones
Junior Member
Joined: Mon Nov 30, 2009 11:08 am Posts: 1
|
 Problem with PHP coding
Hello all I need your help I’m trying to change my java script to PHP scripts, having problems with coding and PHP execution. Thanks in advance, Sj
<script type="text/javascript"> var Hello = 1; while(Hello<=7) { document.write("<font size="+Hello+">Hello</font> "); Hello = Hello +1; } </script>
<?php var $Hello=1; while($Hello<=7) { print("<font size=".$Hello.">Hello</font> "); print(" "); $Hello = $Hello .1; } ?>
|
Mon Nov 30, 2009 7:09 pm |
|
 |
phprogue
Junior Member
Joined: Tue Dec 01, 2009 8:34 pm Posts: 7 Location: Ohio, USA
|
 Quick Fix
There is only one syntax problem with your code:
$Hello = $Hello . 1; ..should be... $Hello = $Hello + 1;
This assumes you are trying to increment $Hello by 1 each time through the loop. You can also use: $Hello++;
|
Tue Dec 01, 2009 8:43 pm |
|
 |
|
|
Page 1 of 1
|
[ 2 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
|
|