Skip to content

Jean-Pierre Lambelet

Il n'y a pas de questions bêtes

  • Programming tips
  • About JP
  • English
    • Français

Author: JP

Non classé 

PHP – mb_strlen to regain the size of a character chain and not strlen

September 4, 2013 JP 0 Comments

Basic I've seen a lot of codes using strlen to recover a character chain size, unfortunately this method, returns the

Share this:

  • Twitter
  • Facebook
Read more
Non classé 

PHP – Replace accents with their counterparts.

September 2, 2013 JP 0 Comments

A small function to replace the character accented their pendants without. function normalize_str ($str) { $invalid ' array,'' 'S', '''s',

Share this:

  • Twitter
  • Facebook
Read more
Non classé 

PHP – Delete Special Characters

September 2, 2013 JP 0 Comments

To effectively remove special characters in a thong, simply use the preg_replace method. $string – preg_replace ('[^a-zA-Z0-9]/s', '', $string);

Share this:

  • Twitter
  • Facebook
Read more
Non classé 

WordPress – How to make a quere like – "%%"

August 30, 2013 JP 0 Comments

To make queries on WordPress, I'm used to using WP_Query ($args). In this example, we are talking about adding a

Share this:

  • Twitter
  • Facebook
Read more
Non classé 

WordPress – Make WP functions accessible in a PHP script

August 30, 2013 JP 0 Comments

To make all wordpress functions accessible in a PHP script, just include the wp_load.php require_once('.. /wp-load.php'); to test, we can

Share this:

  • Twitter
  • Facebook
Read more
Non classé 

PHP – How to change the value of the son of a DOM Object?

August 13, 2013 JP 0 Comments

Using the getElementsByTagName method to navigate and find the wire in question. $number-orders – $image-1–getElementsByTagName ('number_order'); foreach ($number-orders as $key

Share this:

  • Twitter
  • Facebook
Read more
Non classé 

WordPress – Know if the user is an administrator

August 13, 2013 JP 0 Comments

To find out if the current user is an administrator in WordPress, i.e. if they have the right to set

Share this:

  • Twitter
  • Facebook
Read more
Non classé 

WordPress – Character counter for the caption field of an image

August 13, 2013 JP 0 Comments

For every WordPress image, we can add a Caption/Title. It may be useful to add a counter. To do this,

Share this:

  • Twitter
  • Facebook
Read more
Non classé 

jQuery – Which button is selected

August 13, 2013 JP 0 Comments

To recover the value of the select button: $('input[name=radioName]:checked', '#myForm').val()

Share this:

  • Twitter
  • Facebook
Read more
Non classé 

PHP – CURL Authentication

August 13, 2013 JP 0 Comments

To make a curl application with authentication, just add the option CURLOPT_USERPWD $ch curl_init(); curl_setopt ($ch,CURLOPT_URL, url'); curl_setopt ($ch, CURLOPT_USERPWD,

Share this:

  • Twitter
  • Facebook
Read more
  • ← Previous
  • Next →
  • Français
  • English

Recent Posts

  • Symfony – Doctrine – How to see where a sql query is executed
  • Install drupal/console on drupal 9
  • PHP Spaceship Operator <=>
Copyright © 2025 Jean-Pierre Lambelet. All rights reserved.
Theme: ColorMag by ThemeGrill. Powered by WordPress.