Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Breaking String into array 1

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
US
How would I break the string:

'1', '4', '5', '2'

into an array. I tried to simply:

$ids = "'1', '4', '5', '2'";
$ids2 = array($ids);

but it simply puts the whole string into the first member [0]

This is a simplified example, I need to be able to array a variable like this example, though....

thanks

[conehead]
 
explode()

--Chessbot

There is a level of Hell reserved for probability theorists in which every monkey that types on a typewriter produces a Shakespearean sonnet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top