Hi!
Anyone know how to code this:
i have in a value inside ( value ) in some of my posts in excel and i want to remove everything before it imports " included ( and ) and of course the value it self"
example:
I got a ( red ) car!
PHP has a great function ereg_replace that will search for a pattern (using Regular Expressions) and replace it.
In your case, replace it with NOTHING.
Hi!
can you show me how tofix that its replace everything included the () problem is that the value is different in all the files.
here is my import query:
if (($handle = $source_file) !== FALSE) {
$columns = fgetcsv($handle, 10000, ";");
foreach ($columns as &$column) {
$column = str_replace(".","",$column);
}
$insert_query_prefix = "INSERT INTO test (".join(",",$columns).")\
VALUES";
while (($data = fgetcsv($handle, 10000, ";")) !== FALSE) {
while (count($data)<count($columns))
array_push($data, NULL);
$query = "$insert_query_prefix (".join(",",quote_all_array($data)).");";
mysql_query($query);
}
yes i saw that when i read the tread he posted
one more question:
is it possible to narrow it down to the pattern =
( Gå till … … … . . … . ) " i would like to remove every pattern that starts with ( Gå till
so it keeps rows like this:
( Drunk )