Welcome Guest, Not a member yet? Register   Sign In
Exploding Array Elements... Using explode TWICE
#6

[eluser]WanWizard[/eluser]
[quote author="richthegeek" date="1272282533"]WanWizard's code would result in every element being an array, mostly of length 1. This is probably a good thing though![/quote]
Indeed. This way your array is consistent.

Otherwise, when you continue processing the result, you always have to test if the array element is a string or an array, and you need more code to process the element.


Messages In This Thread
Exploding Array Elements... Using explode TWICE - by El Forum - 04-26-2010, 12:24 AM
Exploding Array Elements... Using explode TWICE - by El Forum - 04-26-2010, 12:38 AM
Exploding Array Elements... Using explode TWICE - by El Forum - 04-26-2010, 12:48 AM
Exploding Array Elements... Using explode TWICE - by El Forum - 04-26-2010, 01:08 AM
Exploding Array Elements... Using explode TWICE - by El Forum - 04-26-2010, 01:12 AM
Exploding Array Elements... Using explode TWICE - by El Forum - 04-26-2010, 01:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB