Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • Can you show how to make a array containing (0 1 2 3 4) from for loop when array is empty at first @Stephane Chazelas Commented Jun 25, 2020 at 9:59
  • @DipeshSunrait, see edit. Commented Jun 25, 2020 at 10:01
  • still it doesnt work : imgur.com/a/PgXMnet i have quoted both array and i Commented Jun 25, 2020 at 10:06
  • @DipeshSunrait, try reading my answer again (maybe after refreshing the page). The problem is with your echo $array, not with your loop. Commented Jun 25, 2020 at 10:07
  • OH I FORGOT THAT ITS PRINTING FIRST CHARACTER Commented Jun 25, 2020 at 10:07