I have this value like this in PHP file :
{First=itema,Fourth=10000.0,Second=10,Third=1000},{First=itemb,Fourth=12000.0,Second=12,Third=1000}
How can I split this values 'till I get values like this :
{itema,10000,10,100} AND {itemb,12000,12,1000}
I got that value from method POST in my android apps and I get in my PHP file like this :
<?php
$str = str_replace(array('[',']'), '', $_POST['value1']);
$str = preg_replace('/\s+/', '', $str);
echo $str;
?>
And, this is my code in android apps :
try {
httpclient = new DefaultHttpClient();
httppost = new HttpPost("http://192.168.107.87/final-sis/order.php");
nameValuePairs = new ArrayList<NameValuePair>(2);
nameValuePairs.add(new BasicNameValuePair("value1", list.toString()));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
response=httpclient.execute(httppost);
Log.d("Value Price: ", httppost.toString());
HttpEntity entity=response.getEntity();
feedback = EntityUtils.toString(entity).trim();
Log.d("FeedBack", feedback);
}catch (Exception e){
}
This is link about my code completely :
How can I store my ArrayList values to MySQL databases??
I have been asking before but I couldn't found best way.
Thank you.