maxudaskin Posted June 23, 2008 Share Posted June 23, 2008 I wrote this, but it won't seem to work for me. I want to (let * be a variable) take the first variable from code one and put them into another array. There may be multiple instances that I want to take (lets say each line has a different variable that I want to take). [" * "]*²[/" * "] [" * "]*²[/" * "] [" * "]*²[/" * "] I got this, but it gives me an error. <?php /*******************************************/ /* */ /* Written by Max Udaskin */ /* */ /* max.udaskin@gmail.com */ /* */ /*******************************************/ /* */ /* No part of this script may be used */ /* without written consent of the original */ /* author himself and nobody else. */ /* */ /*******************************************/ // Open, Read and Close the file $file = fopen("constants.txt","r"); $contents = fread($file,filesize("constants.txt")); fclose($file); // Set Variables $varnames = preg_replace("/\[(.+?)\]/*\[/(.+?)]/","$1\n",$output); echo $output; ?> Warning: preg_replace() [function.preg-replace]: Unknown modifier '\' in /home/.grable/vzoom/virtualzoom.net/email/emailer.php on line 22 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.