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

tell csv import script to ignore blank rows?
Hi i have the below script but i get an error if a row is blank ie a return in the csv file at the e

Secure FTP
Hi experts,
There is no SFTP action in MII workbench.
This means it needs developing custo

List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab

Php script to read msword file
hi,

I need to read a msword file and i want to print the contents in that word file.

i

upload image name with extension using php
hi frds..

<input id="file1" type="file" name="file[]" &a

Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sit

BI in Upstream Production operations
Appreciate if you can assist in the following areas:
1) Examples of life before and after BI i

PayPal Redirect Issue
When I have my paypal button set so that is redirects to http://empiremarketing.ca/order.php,it work

Unidentified index error in a simple form
I have been trying to make an HTML form that is handled by a PHP script. So far my attempts to get i

Dynamic Array using glob?
Is there an easier way to do this?

I am trying to get create a dyamic array based on files wi

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