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

BAPI BBP_INB_DELIVERY_CREATE - material number missing in delivery
Hi Experts,

I was able to successfully create an Inbound delivery with reference to a PO

Final year project, please point me in the right direction
hi there for my final year project I'm aiming to build a php script shell to use as an expert system

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

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

scandir clients directory
hi,
how can i scandir the clients directory? i need a script that when i click a button it will u

opening a window with after form submission
I know this this forum has nothing to do with JS, but i'm trying to use it with my php script.
<

How to ... (FAQs)
... get e-mail notifications As several people asked how to get e-mail notifications when new posti

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

fire away
i launched about 4 months ago as a lagit co. i have 2 paying clients, 1probono, 1 side progect, and

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

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