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
Did you know?Explore Trending and Topic pages for more stories like this.
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

Creating a function
Basically i wanna put all this code in a seperate file

Code: <?php

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

How to make URL loads only on login
On my page, when a user login he's redirects to user_home.php. I made it also to open the chat scree

Move array index to end
Hey guys,
Quick question:

I have an array that looks like this:
Code: [Select]$var =

Help with simple query
Hi,

I'm trying to do a Query with a Union where I want to print the number of rows $tc conta

Rand() help needed
Hi all,

Can someone explain and give me a quick example of how I would go about this?

MS are the best!!!
Visit http://www.microsoft.com/australia/windows/default.aspx?h=watch-a-demo and click the massive '

How could I do this?
Ive got a simple lottery game, and am using an sql database to keep track of the numbers bought. But

Parse Error with doctype
I'm getting a parse error with this simple code. I don't get it. It worked one time then when I relo

Save User Inputs while javascript reloading!
hi..
i have written a PHP code in which i reload the page when user selects a value in dropdown..

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