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

305 Like 10 Dislike
Previous php-forum Next php-forum
Other php-forum

Populate drop down list from table??
Lets say for arguments sake that i have a table which contains the numbers 1 to 10.
How can i get

problem with php mysql query
Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab r

wav to mp3 + goDaddy
I need to convert wav files to mp3s. From what I have found so far one way to do it is to have my PH

Extracting URL pointer within XML tag
Hi.

I'm trying to extract text between two quotation marks in XML. For example, I want to ex

Where is my php.ini???
Hi

First off - apologies - i'm not a coder so this may sound very amateur.

I'm having

Something like an INI editor or a DelimitedText-Editor
Hi all,

Am very, very, very new to PHP and not sure if I should be posting this to a Javascri

Probably a simple error...
I'm getting the error -- Parse error: syntax error, unexpected '{' in /home/content/c/s/t/csteffen24

a multi dimensional array with for each
hi, I have been asked to write an array, I have Zone 2,3,4,5,6,7,8 each zone has 3 sections of weigh

Database/Table Collation
What is the Database, and table collations used for? i don't understand what there used for since co

WORDPRESS - Multiple Loops Only Going to One Post?
I have various pages with multiple loops and i need them to be individual to all other categories.

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