Monday, June 23, 2014

PHP explode() Function

Definition and Usage

The explode() function breaks a string into an array.
Note: The "separator" parameter cannot be an empty string.
Note: This function is binary-safe.


Break a string into an array:
$str = "My name is KC Verma";
print_r (explode(" ",$str));

Result -
Array ([0] => My [1]=>name [2]=> is [3]=> KC [4] => Verma)



separatorRequired. Specifies where to break the string
stringRequired. The string to split
limitOptional. Specifies the number of array elements to return.Possible values:
  • Greater than 0 - Returns an array with a maximum of limit element(s)
  • Less than 0 - Returns an array except for the last -limit elements()
  • 0 - Returns an array with one element


  1. that was awesome information thanks for sharing i know this is common one and every php developer have knowledge about it but i'm sure this will help to a person who is new in php

  2. Nice Posting! because there are a lot of informative postings so, thanks a lot for sharing the information. Ecommerce website Designing in Mumbai || Ecommerce Solution || Ecommerce Solution in Mumbai

  3. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me. Dynamic Website Designing || Dynamic website Designing in Mumbai || Ecommerce website Designing

  4. Thanks for nice post. It is complicated to me now, but in typical, the efficiency and significance is annoying. Very much thanks again and best of luck! Thanks for sharing. Website Maintenance in Mumbai || Website Development || Website Development in Mumbai

  5. Excellent post, I agree with you 100%! I’m always scouring the Internet for new information and learning whatever I can, and in doing so I sometimes leave comments on blogs. Web Designing || Web Designing in Mumbai || Website Maintenance

  6. It was very useful for me. Keep sharing such ideas in the future as well. This was actually what I was looking for, and I am glad to came here! Thanks for sharing the such information with us. CMS Website Design || CMS Website Developer || CMS website development company

  7. This is very informative post to help learners, who want to work in drupal development

  8. This is Awesome Wonderful Information.. Very Nice.. Useful information Thanks.

  9. I found a lot of information here to create this actually best for all newbie here. Thank you for this information.
    Jugar juegos de frozen en línea gratis, los nuevos de princesa de Disney juegos frozen - la princesa encantadora y linda. Divertirse frozen!

  10. Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me
    download free Descargar Whatsapp Para Android and download baixar whatsapp para celular online and descargar whatsapp , baixar whatsapp gratis

  11. Nice Information about the Drupal. Open Source CMS development is one of the most scalable choices for variety of businesses.

  12. Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me
    facebook entrar iniciar sesion gratis - Sitio Oficial iniciado sesión en Facebook lengua española. facebook entrar rápido, facebook iniciar sesion en tu cuenta de entrar facebook

  13. Great info. I love all the posts, I really enjoyed, I would like more information about this, because it is very nice., Thanks for sharing.
    download facebook movel, baixar Facebook movel, baixar facebook. Facebook chat, baixar whatsapp, fazer o download whatsapp baixar para Android, iPhone. Últimas Facebook

  14. This is extremely helpful info!! Very good work. Everything is very interesting to learn and easy to understood. Thank you for giving information.
    Versión en facebook español a los países hablan Español: facebook login entrar , facebook en español para and facebook entrar direto


only show translated menu items into current language (Drupal 8)

function MY_THEME_preprocess_menu(&$variables) {   if ($variables['menu_name'] == 'brancott-header-menu') {    $langu...