Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
[PHP] Array Help [PHP]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Markshall" data-source="post: 228580" data-attributes="member: 1872"><p>Truth is, no user is going to want to see array(1) { [....] } etc, you could do something like this</p><p></p><p>I'm on iPad so if its bad, sorry lol</p><p></p><p>[php]public function displayErrors() {</p><p> if (count($this->error) > 0) {</p><p> echo '<ul>';</p><p> foreach ($this->error as $anerror) {</p><p> echo '<li>' . $anerror . '</li>';</p><p> }</p><p> echo '</ul>';</p><p> }</p><p>}[/php]</p></blockquote><p></p>
[QUOTE="Markshall, post: 228580, member: 1872"] Truth is, no user is going to want to see array(1) { [....] } etc, you could do something like this I'm on iPad so if its bad, sorry lol [php]public function displayErrors() { if (count($this->error) > 0) { echo '<ul>'; foreach ($this->error as $anerror) { echo '<li>' . $anerror . '</li>'; } echo '</ul>'; } }[/php] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
[PHP] Array Help [PHP]
Top