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

help with database debug pls
Parse error: syntax error, unexpected T_ELSE in /home/content/m/e/s/mesick/html/students/05/php/chec

Scrolling news bar and MySQL
I am not sure if this is the correct forum to post this on. If not, I apologize. I am still pretty

Problem in back link
I have page where i have given javascript back link but when i click on it browser give a message

PHP mail() with images
I'm trying to get images to send along with my HTML e-mail sent through PHP mail(). I only tried vie

Libraries in C++
Hi all,

I have two libraries. one is based targeted on linux platform and uses another li

Form validation with functions
Hi there

I am trying to make a very simple form validation function. I currently have the fol

Mail sending is slow on server
Why mail is taking time to be send on apache-linux server

. and .. appearing instead of pictures
First of all, thanks very much for providing this forum. It is very much appreciated!

My son

$_POST variable un-useable
I'm trying to use a $_POST variable in a mysql update statement but i can't use it for some unknown

Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in

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