Welcome Guest, Not a member yet? Register   Sign In
How to change eregi() to preg_match()
#1

[eluser]ibon[/eluser]
Please anyone help me,.


<?php
$headers = array_keys($csv[0]);
foreach ($headers as $v){
$hdr = trim(str_replace('"','',$v));
if ($hdr != '' && !eregi("thumbnail",$hdr) && !eregi("image",$hdr)){
echo "<th>".$hdr."</th>\n";
}
}
?&gt;

&lt;?php
foreach ($csv as $key => $line){
echo "<tr align='top'>\n";
foreach ($line as $f => $d) {
$FIELD = trim(str_replace('"','',$f));
$FDATA = trim(str_replace('"','',$d));
if ($FIELD != '' && !eregi("thumbnail", $FDATA) && !eregi("image", $FDATA)){
echo "<td>";
echo $FDATA. "\n";
echo form_hidden("line_$key"."[".$FIELD."]", $FDATA);
}
}
echo "</tr>\n";
}
?&gt;


Messages In This Thread
How to change eregi() to preg_match() - by El Forum - 10-26-2010, 12:18 PM
How to change eregi() to preg_match() - by El Forum - 10-26-2010, 01:42 PM
How to change eregi() to preg_match() - by El Forum - 10-26-2010, 06:54 PM
How to change eregi() to preg_match() - by El Forum - 10-26-2010, 07:08 PM
How to change eregi() to preg_match() - by El Forum - 10-26-2010, 09:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB