Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
how to use implode and explode?...
Old 02-07-2006, 11:40 PM how to use implode and explode?...
Novice Talker

Posts: 5
Trades: 0
can anybody help me about implode and explode..
i have inserted my data using implode and i have made use of
"-" as a sign...
how can i view this???....
ace04 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-09-2006, 05:48 AM Re: how to use implode and explode?...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
I guess you need the PHP Forum
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-14-2006, 12:03 PM Re: how to use implode and explode?...
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
Thread moved.

Implode takes an array, and squashes it together into a single string putting a specified string inbetween each piece. Explode does the opposite and splits a string into pieces, with the boundaries being the string you specified. So,

explode('-',"one-two-three") gives you array("one", "two", "three"), and
implode('foo',array("a","b",c")) gives you the string "afoobfooc".
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 02-21-2006, 05:00 AM Re: how to use implode and explode?...
Novice Talker

Posts: 5
Trades: 0
i'm having prblm executing this one:

for ($i="1"; $i<$dependent; $i++)
{
if(!checkifchar($dname[$i]))
{
$dname[$i]="";
}
unset($nb_dname);
$dname = implode("|", $dname);
$dage = implode("|", $dage);
$dschool = implode("|", $dschool);
$dyrlevel = implode("|", $dyrlevel);

$qdependent = "INSERT INTO dependent ('dependentID','dname','dage','dschool','dyrlevel' )
VALUES ('$i','$dname','$dage','$dschool','$dyrlevel')";
dbQuery($qdependent);

when i first use this.. it actually saves into mysql.. but now when im going to execute it again.. it can't insert into mysql anymore.. can you please give me an explanations or on how to solve this problem?.. thanx and godbless....
ace04 is offline
Reply With Quote
View Public Profile
 
Old 02-21-2006, 08:33 AM Re: how to use implode and explode?...
Junior Talker

Posts: 4
Trades: 0
try this when inserting :

mysql_query($yourSqlStatement, $yourDb) or die(mysql_error());

=> it can help
peatch is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to how to use implode and explode?...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15047 seconds with 12 queries