chennaibala Posted September 16, 2009 Share Posted September 16, 2009 hi frds... in my hiden textbox.i have following values... robert|true|true|false|arun|true|false|true|anu|tr ue|true|false| i want to splits in to token and insert in mysql table in following manner namefield writefiled readfield speakfield robert true true false arun true false true anu true true false thanks in advance... Quote Link to comment Share on other sites More sharing options...
priti Posted September 16, 2009 Share Posted September 16, 2009 robert|true|true|false|arun|true|false|true|anu|true|true|false| I will suggest a small change first you change the delimiter to identify which is new record i.e $str="robert|true|true|false#arun|true|false|true#anu|true|true|false|"; now $dataArr=explode("#",$str); $tokenitemArr=explode("|",$dataArr[0]); //you can loop over $dataArr print_r($tokenitemArr) for you query and insert it. Quote Link to comment Share on other sites More sharing options...
chennaibala Posted September 16, 2009 Author Share Posted September 16, 2009 still no idea priti.. Quote Link to comment Share on other sites More sharing options...
priti Posted September 29, 2009 Share Posted September 29, 2009 Kindly let me know whether you undrestand following? $str="robert|true|true|false#arun|true|false|true#anu|true|true|false|"; why I suggested you the change. ?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.