How do i parse the the value from a string in the function call?

gosgi

New Member
i have function which is something like this\[code\]function multiple_delete($entity1,$entity2,$entity2) { $query = "SELECT * FROM tablename WHERE id = '4' "; $result = mysql_query($query); $row = mysql_fetch_array($result);echo $entity1;echo $entity2;echo $entity3;}\[/code\]and my function call is\[code\]multiple_delete('$row[\'pic_title\']', '$row[\'pic_brief\']', '$row[\'pic_detail\']');\[/code\]keeping in mind the three value which i am passing through the parameter is the entity name of particular table.now this function will print it as the string i.e ($row['pic_title'], $row['pic_brief']', $row['pic_detail']) and hence not parse it as the value which i want it to do. if it parse it as the value then i will be able to get the records from the database. i have tried with the combination of single quotes, doubles, with concatenation operator etc. is there any way i tell the script that do not parse it as the string instead treat it as it have been declared to fetch the value from database. does php have any function for this ? or i am going wrong with the logic. if i skip the parameters and declare in the functions something like this.\[code\]echo $row['pic_title'];echo $row['pic_brief'];echo $row['pic_detail'];\[/code\]it works perfectly fine . why is that when i try to achieve the same thing with the help of parameter it refuses to fetch the value from the database, and instead it returns the same declared string from the function call.Please do not tell me that i dont need that parameter, i need it because i want it to perform the dynamic data manipulation, with regard to different tables and different table entities. and the above function is just the demonstration of my problem not the exact function. if you want to have a look at the exact function you can check here.http://stackoverflow.com/questions/3588907/what-is-wrong-with-my-functionthank you
 
Back
Top