String Delimitation in Web Applications Primer Tutorial

String Delimitation in Web Applications Primer Tutorial

String Delimitation in Web Applications Primer Tutorial

Web application client and server logic is often based on …

  • string manipulations via Javascript (client) and PHP (server, for us) string functions … and a huge subset of functionality, at least for us, is …
  • handling delimitation issues via Javascript split and PHP explode methods

You could quibble about the syntax differences between Javascript split and PHP explode methods, but they have the same aim in mind … they …

  • return a Javascript array (or Array object) and PHP array object respectively …
  • have involved in their argument list a “delimitation” argument (as the criteria behind how they create that array)

No rocket science, but if you like to gather little rockets together in a (Javascript (object)) string (of object method calls) or (PHP) nest (of calls), then the potency of these two (string delimitation) methods can become apparent. Whole jobs can base themselves on delimitation, at least in our books (but definitely not our pamplettes) as we would direct you to with Textarea Pointing Local Font Colour Tutorial where we were inventing the delimitation rules, as well as implementing them. In such a scenario, would hate to be tasked with the job of counting how many times we’d have used Javascript split (and/or PHP explode) in such a job. Perhaps the alternative, of thinking that every bit of data should be in a database, and admittedly documented in this way, is more appealing to you as a formal approach, but if you tend to think this way, perhaps you are overengineering, and not using self-explanatory enough variable names to balance the syntax ugliness of “stringing” and “nesting” with the speed of coding.

And that is what is great for us. You can delimit away, and the speed of coding using split and explode means that break for coffee can be achieved earlier.

Let’s leave you with some worked examples of usage involving …


The quick brown fox jumps over the lazy dog. The rain in Spain falls mainly on the plain. Many hands make light work.

You can see us clicking the (Javascript client “split” usage) links above in today’s PDF slideshow.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Tutorials and tagged , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *