Jump to content

how would I make array follow a number


dyluck

Recommended Posts

Hello,

 

I don't know how to ask the question properly, but what code could I use to turn, for instance, the number 8 into

array(1,1,1,1,1,1,1,1)

(basicly, i need a foreach loop to cycle x times depending on the same x numerical value).

 

does anyone know a super easy way to do this?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/187800-how-would-i-make-array-follow-a-number/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.