/    Sign up×
Community /Pin to ProfileBookmark

exploding an array

is there a way/command to explode an array

for example. i have

$cli_address = array(
“houseno” => $_POST[‘houseno’],
“street” => $_
POST[‘street’],
“city” => $_POST[‘city’],
“county” => $_
POST[‘county’],
“postcode” => $_POST[‘postcode’],
“country” => $_
POST[‘country’]
);

and if i want to do this
if ((preg_match(‘/[^a-z]/i’, $cli_address))

explodeing the array as a string without having to list all the values

also if there is a solution to this would it work on arrays nested in arrays?

thanks in advance

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@chazzyFeb 12.2006 — [URL=http://www.php.net/explode]explode!![/URL]
Copy linkTweet thisAlerts:
@NogDogFeb 12.2006 — I think you might be talking about [url=http://www.php.net/implode]implode()[/url], perhaps? However, I'm not sure if that's the best solution: depending on exactly what you're trying to do, something like [url=http://www.php.net/foreach]foreach[/url] or [url=http://www.php.net/array_walk]array_walk()[/url] might make more sense.
×

Success!

Help @knowj spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...