Jump to content

[SOLVED] Array help


EchoFool

Recommended Posts

I have a value which carries to bits of infomation seperated by | symbol. But I do not know how to split them into two different variables.

 

<?php
$ID = 'Country|23';
$IDType = explode('|', $ID, -1);
$IDType[0] = $Type;
       $IDType[1] = $TypeID;
?>

 

What im trying to get is

$Type = Country;

$TypeID = 23;

 

But it is not working, what am i doing wrong ?

Link to comment
https://forums.phpfreaks.com/topic/114184-solved-array-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.