Jump to content
xisto Community
Sign in to follow this  
electriic ink

Converting Characters In A Variable To Individual Values In An Array turning variables into arrays

Recommended Posts

Say I have a variable such as $nav_item and it had to contents Home. IE:

 

$nav_item = 'Home';

How would I make so that $nav_item was an array and had the following contents?

 

$nav_item = array ('h', 'o', 'm', 'e');

With the case changing (ie H would become h and U would become u)

 

EDIT: Okay found out that I could change the case with array_change_key_case ($nav_item, CASE_LOWER);

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.