Jump to content

  •  

Staff applications open!

We are looking for dedicated members to join the Community Team to help enforce the community rules and make IV a better place for everyone.
Do you think you have what it takes to join? Apply here: http://invision-viru...f-applications/
IV Management

PHP in Pages

ips4

  • Please log in to reply
2 replies to this topic

#1 seventeen82

seventeen82

    Advanced Member

  • Member
  • PipPipPip
  • 70 posts

Donator

Posted 08 June 2017 - 06:56 PM

I have a database page set up, with a text area for users to put in raw html. Only select few users will have permission to use the database.
I wanted to make a PHP variable to store an array. But the php just gets printed as text.



{{$servers = array('192.223.28.120:27014' => "Operation", '192.223.28.120:27015' => "Realism", '192.223.28.120:27016' => "Tactical Co-Op", '192.223.28.120:27017' => "Training", '192.223.28.120:27018' => "Day of Infamy", '192.223.28.120:27019' => "Fun Co-Op");}}
<ul class='ipsList_inline'>
{{foreach $servers as $ip => $title}}
<li>
{$title} : {$ip}
</li>
{{endforeach}}
</ul>
Any ideas what I can do to allow this or get it working?

Edited by adcantu, 02 July 2017 - 09:29 PM.


#2 wasplays

wasplays

    Newbie

  • Member
  • Pip
  • 7 posts

Posted 29 June 2017 - 07:04 PM

You miss a ' in <ul> tag <ul class='ipsList_inline> to<ul class='ipsList_inline'>

#3 seventeen82

seventeen82

    Advanced Member

  • Member
  • PipPipPip
  • 70 posts

Donator

Posted 02 July 2017 - 09:29 PM

Thanks for the reply. I updated my OP with that. However that still doesn't solve the issue of my array not working.





Also tagged with one or more of these keywords: ips4

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users