I have a variable that has
, spaces and other symbols in and is causing errors (Notice: Undefined offset: 0) in my code.
I am trying to update the terminal note on my MikroTik routers via API but when the note variable has multiple lines and
's and so on, it causes the rest of the code not to work and gives me errors.
How can I fix this?
My code:
$config['routeros']['note'] = "\
------------------------------------------------------------\
Warning! This device is secured by\
_____ ____ _ \
/ ____| | _ \\ | |\
| | __ _ __ ___ ___ _ __ | |_) | __ _ _ __ __| |\
| | |_ || '__|/ _ \\ / _ \\| '_ \\ | _ < / _` || '_ \\ / _` |\
| |__| || | | __/| __/| | | || |_) || (_| || | | || (_| |\
\\_____||_| \\___| \\___||_| |_||____/ \\__,_||_| |_| \\__,_|\
N E T W O R K S\
------------------------------------------------------------\
\
Unauthorised access is prohibited and shall render the user \
liable to criminal and/or civil prosecution.";
Output of print_r($config);