PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I want to slap a variable in the middle of my RegExp... the only thing is, the variable contains a forward slash and I'm not sure if it's messing up my code?
I keep getting this error
Warning: Unknown modifier 'a' in C:\Webs\email\app\index.php on line 72
$default_path = 'netscape/mail/'; //Testing with this assignment
foreach ($mailboxes as $v) {
preg_match('/^\{.*\}'.$default_path.'(.+)$/',$v,$mailbox); // LINE 72!!! Remove server from mailbox string
if (isset($mailbox[1])) {
echo '<tr><td class="folderlist" style="border-bottom:1px dashed #F73B36"><b> <a class="folderlist" href="?mail_folder='.$mailbox[1].'">'.$mailbox[1].'</a></b></td></tr>';
}
}