$expode_top[] & $expode_bottom[] usage

I'm rewriting a PHP plugin, and there are functions called $expode_top[] & $expode_bottom[]. I understand what the normal explode function does, but what are these?

It seems to be impossible to find an answer on Google because it replaces the underscore with a space.


Those are array variable names, not functions, as indicated by the $ and []. Also, neither exists as a function.

Those are array variables, not functions, they just happen to start with a keyword you are familiar with. Anything beginning with a $ is a variable in PHP.

Using [] will put the assigned variable into the "next" position of the array. For example:

$expode_top = array();
$expode_top[] = "testing";

if ( $expode_top[0] == "testing" ){
    echo "it does equal testing";

As @gwillie rightly commented, it could also be a variable function - the name of the variable is replaced and then that function is executed. Second example:

$expode_top = "echo";

Is functionally the same as:

Tags: PHP / Wordpress / Plugins

Similar questions

Memory usage when querying users
I'm having a small issue with one of my queries here. I cannot increase my wordpress memory limit as long as hostgator sets it to 64mb. I'm not sure if its possible to reduce the amount of memory used making some changes to my code, here is the code I'm using to query users from a specific role and displaying their name, profile and avatar:
Anonymous functions usage
Just wondering what the preferred method of using anonymous functions is. First I had some code like this: But I know WordPress discourages using variables for things that will only be used once so I switched it to But now I'm thinking why even use a function at all? What is the preferred method? Any reason why? Perhaps update the WordPress Coding ...
The effect of spam comments on hosting resource usage (CPU)
One of my WP sites is using a lot of CPU, and I am wondering if this is caused because of the high number of spam comments it is getting. Can that be the case? Is there an easy way of checking that? Thank you.
Advanced Custom Fields - Storing array value for further usage
This might might be more of a PHP question - but does deal with a WordPress plugin, Advanced Custom Fields I am using a global select option to store a specific Location (custom post type) as the headquarters. I am storing the value as such: What I am fuzzy on is - since my option is only allowed to grab one value -- is there an alternative to usin...
wordpress template page Usage
Possible Duplicate: Loading template files from a subfolder in my theme? How to create template page which is in a separate folder within theme directory, for pages and also to open it in other pages (i.e: link to those template pages.). I have created a folder in my theme directory and inside it i also create a template page but no working.
How Can I Centralize Content Usage and Approval in a WordPress Multi-Site installation
I am working with a non-profit client that runs several charities under one umbrella. A good metaphor would be to think of the United Way (but it's not the United Way). Can a WordPress multi-site installation do the following: Share content between sites. E.g., if site A has a section called "Advocacy", can that same content also be shown in site B...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.