do while...woes


Posted on 16th Feb 2014 07:03 pm by admin

I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work, the page hangs... what am i doing wrong here??
<?php
$number = 5;
?>
<?php
while ($number < 10){
$number = $number + 1}
?>
<?php
echo $number
//hoping for it to be 10
?>

before you ask, i'm trying to figure out the principal to make this work, I'm not actually trying to make a number less than 10 become 10, but I need to know how to make this work to do some things. Thanks!!

No comments posted yet

Your Answer:

Login to answer
252 Like 43 Dislike
Previous forums Next forums
Other forums

Sub-domains & calling unique content
Hello,

Is there a way use something similar to the $_GET function for a sub-domain? I to be a

Generating unique numbers using php
Hi,
I need help in generating unique number using php.I tired using rand() in php.But, by using r

Estimations and Effort
HI Gurus,

Would like to know whether SAP have a provision for carrying out the Project es

PHP5 - AJAX help
I've been following the tutorial on w2schools (http://www.w3schools.com/php/php_ajax_database.asp) a

need to add "sizes" to shopping cart
Hey guys, I am trying to figure out a way to add a "size" selector on to this bit of code.

Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_

Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow peopl

Xacute search within SQL results
I have a query that is pulling data, and I want to return a specific value from the results of that

Operating System
How in PHP or other language can I detect Operating system, ie Windows XP Home, Windows 7 Ultimate,

Using cURL to PUT
Can somebody help with the correct php code to make a cURL PUT request. Here is a sample of code bel

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash