puting for loop in 1 value


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

hi ,

how do i put this code in 1 value:
Code: <?php
for ($i=1; $i<=5; $i++)
{
echo $i ;
}
?>
the output will be: 12345

how do i put the result in one value ,some thing like :

if the result is 12345 then it will be equal to $the_value

and when i echo $the_value , the result will be 12345

the quastion is how to put the result of the forloop in one value for later use

thanx

No comments posted yet

Your Answer:

Login to answer
305 Like 10 Dislike
Previous forums Next forums
Other forums

Javascript form submit and radio buttons?
When this form is submitted, it is automatically resubmitted using JS.

All my fields are carr

Preloading images
Posting this question here because I am not sure where this should belong.I am building an asp.net a

Problem with Subscreen
Dear Experts ,
I am facing a problem with the subscreens. My senario is as follows :

php/mysql auto logout after 2 hour and reset password
Hi all,

This I hope will make sense. I've the following code which when a user logins in, cr

Multiple if statements
Ok so seems basic but for some reason I'm not doing it right. What I want is to be able to have 2 se

Impact of movement type 412 E on MAP
Hi

Usage of movement type 412 E is causing huge change in MAP .

Is there any r

Call to undefined function mysql_fetch_accoc()
New to php/mysql coding. What's wrong with this sequence, or am I
just not seeing to obvious?

problem when runing a funciton
I am trying to connect to database using a funciton in a functions.php

<?php
funct

What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is goin

Undefined offset when using a flat file with pipe symbols
Hi, I've got a flat file/text file which I'm currently using as a member database for my site (not a

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