Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Dec. 31, 2010 13:50:00

Richard Q.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Working with arrays.


Hi.

What macros exist regarding processing arrays in PHP (core not userland)?

I want to pass ...

array('value1', 'value2', 'value3')

to a function and in the function have it converted to

'value1\0value2\0value3\0\0'.

Conventionally, I'd need to iterate the array to get the lengths of
all the elements, add the number of elements to this value and then 1
more for the trailing \0.

Unless there are some macros to allow to do this sort of thing more easily.

Regards,

Richard Quadling.

--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

Board footer

Moderator control

Enjoy the 19th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support