Michelangelo van Dam: PHP arrays – simple operations

Michelangelo van Dam continues his series on some of the basics of PHP with another look at arrays (started in this article).

Like all things in life, we need to start with simple things. So, in order to understand what arrays are in PHP, we need to take a look at the PHP manual to read what it is all about. […] The thing with PHP is that an array is probably one of the most used data structures in web applications build with PHP and used for a wide variety of purposes.

He covers the basics of:

  • storing multiple values in an array and pushing additional values onto the end
  • removing the last item added to the array
  • pulling the first element off of the array

In his next article, he plans on expanding this introduction to arrays by looking at associative arrays.


SitePoint PHP Blog: First Look at Flarum – Next Generation Forums Made Simple

On the SitePoint PHP Blog Jeff Smith introduces Flarum, a project that bills itself as "forums made simple" that’s easy to set up and includes both the standard features you’d expect from a forum and some interesting "power" ones as well.

[Flarum](http://flarum.org) is a forums solution that is currently in public beta and is under active development. Today we’re going to take a look at it, get it set up in a [Homestead Improved](http://www.sitepoint.com/quick-tip-get-homestead-vagrant-vm-running) Vagrant virtual machine, and look at the configuration and the features that Flarum offers. Then, we’ll compare it to some other forums platforms to see how it stacks up at a glance.

They start with a bit of environment setup including the creation of the Homestead virtual machine. The tutorial then roughly follows the installation guide and helps you get the software installed, the web server configured and configuring the software via the Admin interface. They help you set up some of the basics, permissions, change the appearance of the site and work with tags and extensions. They get more into this last topic, introducing some of the things you can customize in the layout and links to more information on both extensions and themes. The post ends with a brief overview of some of the general features that the forum offers including it being touch friendly, "friendly" URLs and easy moderation functionality.


PHPBuilder.com: PHP Simple HTML DOM Parser: Bearbeiten von HTML-Elementen in PHP

Auf PHPBuilder.com heute gibt es ein neues Tutorial Vojislav Janjic über die Verwendung einer in PHP das Markup bearbeiten, auch wenn es nicht korrekt W3C-Format – der Simple HTML DOM Parser

Einfache HTML-DOM-Parser ist ein PHP 5 +-Klasse, die Sie manipulieren HTML-Elementen hilft. Die Klasse ist nicht gültig HTML beschränkt, sondern kann auch mit HTML-Code, der nicht bestanden hat W3C-Validierung zu arbeiten. Document-Objekte können mithilfe von Selektoren, ähnlich denen in jQuery werden. Sie können Elemente von IDS, Klassen, Tags und vieles mehr. DOM-Elemente können hinzugefügt, entfernt oder geändert werden.

Sie erleichtern Ihnen den Einstieg mit dem Parser und übergibt die HTML-Inhalte zu handhaben (entweder direkt über einen String oder Laden einer Datei) und Ortung Elemente in das Dokument entweder durch ID, Klasse oder tag. Selectors ähnlich wie in CSS zur Verfügung stehen. Schließlich zeigen sie, wie ein Objekt zu finden und aktualisiert die Inhalte, indem Sie entweder mehr HTML innen oder durch Anhängen einer neuen Sache nach.