DataTable render table: find string and replace
DataTable render table: find string and replace

Hi all,
i have this php code and i would like to do the same thing with the use of render in datatable:
$a1=str_replace("30007","DSL_ID",$row["summary"]);
$a1=str_replace("230003","Unit ID",$a1);
$a1=str_replace("30005","Data Link Sapi ID",$a1);
$a1=str_replace("220005","Lapd & EOC interface identification",$a1);
$a1=str_replace("410001","Chassis ID",$a1);
$a1=str_replace("10004","FAN ID",$a1);
$a1=str_replace("30001","ISUP interface ID",$a1);
$a1=str_replace("30002","CIC",$a1);
$a1=str_replace("1030003","Unit ID",$a1);
$a1=str_replace("30018","MTP3 Link ID",$a1);
$a1=str_replace("30012","IP address",$a1);
$a1=str_replace("30013","IP port",$a1);
$a1=str_replace("30048","Network ID",$a1);
$a1=str_replace("10002","Slot ID",$a1);
$a1=str_replace("1110001","Chassis ID",$a1)
The result of this php code for one row is for example:
ET10007_PC40303_SP0|Chassis ID=69, FAN ID=2
can someone help me?
thanks
Answers
The original row ($row["summary"]) is like this:
ET10007_PC40303_SP0|410001=87, 10004=5
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Here
live.datatables.net/vosihuha/2/edit
a test case.
for example, the second record is:
ET10007_PC40303_SP0|410001=87, 10004=5
I would like to replace dynamically 410001 in Chassis ID
and 10004 in FAN ID
and so on for the other records using the translation code listed in the first post
Use
columns.render
for this. For example:http://live.datatables.net/vosihuha/3/edit
Kevin
Hi Kevin,
Thanks a lot
regards