Are there any PHP text editors where I can expand or collapse multi-level arrays? In Notepad++ I can do it with comments or if constructs but not with array variables. Does there exist a program like that? thanks! :)

2 Answers 2


SublimeText does that. Notepad++ used to be my favourite but recently I've started to prefer SublimeText - and this is on of the reasons. SublimeText has a free non-time limited trial; a per-user (rather than per-machine) licence is $70 but I'm thinking it may be worthwhile due to the greatness of Sublime).

Here's a screenshot of how Sublime Text shows multi-dimensional PHP arrays; each of those three arrays is identical but in a different state of collapse. enter image description here

  • it seems a very good editor. do you know something else for free?
    – JB-Franco
    Commented May 14, 2014 at 16:51
  • Forever free no - you can legally and morally use the free trial of this for a couple months anyways. Legally I can't comment on longer than that but morally testing is questionable much past that. Commented May 14, 2014 at 17:05
  • @JB-Franco Is free a hard requirement? (If so good to mention it in the question to get better answers) Commented May 14, 2014 at 17:06
  • No it's not a requirement!
    – JB-Franco
    Commented May 14, 2014 at 17:09
  • for further information this capacity of a text editor is called Code folding. I have seen that also Ultra Edit have this ability applied to arrays!
    – JB-Franco
    Commented May 15, 2014 at 18:43

SynWrite editor (Windows) also does this.
A shot with php array:

Php array

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.