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

user administration
Dear @all,

what I have to do to set the user defaults for new users. At the moment I woul

Values disappear from my array :( HELP!
hey all, I have a lil mysql/php/apache script that queries a database
and pulls put 5 integers.

DBCA Templates
Hi all,

I'm working on creating a template for DBCA, but can't find any documentation on the

MySQL issue
I am taking sentences through a form on page. Then checking some condition and trying to insert them

Inserting the current date/time while submitting the forum
What do I need to add below to update the current date/time? I have a field in the database called d

Remove letter from numeric textbox
I have a textbox that will search the employee database by entering in the employee ID and it will r

Why is my row count 0?
Here's the MySQL query i'm running. It basically pulls data from 2 tables based on some data passed.

socket communication between c++/java and sending image
hi,

i have a class in c++ called win32_sockserver which creates socket to java. i am trying

first id from db not showing
I have a php script which displays the content of a mysql table as a html table with sorting, delete

Lining up columns nicely.
Hello everyone, I'm having problems with making columns line up properly. Here is my code:

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