Jump to content

extracting specific array keys


jimfog

Recommended Posts

I have an array like this one:

$weekdays_all=['monday'=>NULL,'monday_b'=>NULL,'tuesday'=>NULL,'tuesday_b'=>NULL.etc];

I want to extract all the _b days from it and push them into a new array...

$b_days=['monday_b'=>NULL,'tuesday_b'=>NULL];

How I am going to do it?

 

 

Link to comment
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
×
×
  • Create New...