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

Cursor statement failed with errors
Following statement failed with the errors.

cursor proj_cursor1 is (select projectID from

paginate search result
Hi, I have a paginations script to display data from my database but i would like to paginate someon

Running External Scripts
I am very new to PHP and am not even sure what I'm asking is possible. I have just installed mediaW

why aint this working?
i have this code:

Code: $num = 250;
$count = ($num - $rcount);

echo $rc

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

Call db table from any PHP file
Hi,

I want to be able to call a database table that will be setup in another file called init

SAP Management Console is blank
Dear All ,

I am facing problem in my des sever suddely in SAP Management Console is blank and

weird problem
last time, i did post a topic concerning why my page sometime will load as blank page when using IE.

Entering Data Problem
Code: $result = mysql_query("SELECT * FROM flights");
while ($row = mysql_fetch_array($

Displaying Site Logo/Icon on a Title tag
really need some help out here. I want to insert a Logo/Icon just like the one close to the "PH

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