Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

spaces in an array

  • 18-02-2008 01:07PM
    #1
    Registered Users, Registered Users 2 Posts: 94 ✭✭


    I'm trying to fill an element in an array with a specific amount of spaces, eg 40, but the array is triming it down to one space. How do I stop it?


Comments

  • Registered Users, Registered Users 2 Posts: 94 ✭✭sinkingfish


    oh it's php btw


  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    Any code?


  • Registered Users, Registered Users 2 Posts: 1,287 ✭✭✭joe_chicken


    I'm trying to fill an element in an array with a specific amount of spaces, eg 40, but the array is triming it down to one space. How do I stop it?

    Don't know much about PHP, but by the way you've explained it, you are trying to put an array of characters (i.e. a string of spaces) into one element of an array of characters.

    By the sounds of it, you'd need an array of arrays (or strings) so that each element in the bigger array can hold more than one character.


Advertisement