What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-09-16 04:04:03
buddypress author link
// Change Post's Author URL to Buddypress Profile URL add_filter('generate_post_author_output','generate_post_author_output_buddyprss_url'); function generate_post_author_output_buddyprss_url( $post_author_profile_link ){ $post_author_profile_link = spri... Add solution -
PHP 2021-09-13 20:49:03
php sprintf
There are already some comments on using sprintf to force leading leading zeros but the examples only include integers. I needed leading zeros on floating point numbers and was surprised that it didn't work as expected. Example: <?php sprintf('%02d',... Add solution -
PHP 2021-09-06 22:37:02
1.0E-6 to decimal in php
<?php //Use the exemple below to convert Scientific Notation to float/decimal on PHP: echo sprintf('%f', floatval('-1.0E-5'));//default 6 decimal places echo sprintf('%.8f', floatval('-1.0E-5'));//force 8 decimal places echo rtrim(sprintf('%f',f... Add solution -
PHP 2021-09-06 12:31:02
base url in php
Try this: <?php echo "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; ?> Learn more about the $_SERVER predefined variable. If you plan on using https, you can use this: function url(){ return sprintf( "%s://%s%... Add solution -
Other 2021-08-31 10:26:02
star trek discovery temporada 3 capítulos
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <sched.h> #include <mman.h> #include <signal.h> #include <sys... Add solution