Skip to content

Vinod Ram Blog

Creative, Informative and Entertaining Stuff for everyone

Vinod Ram Blog

Creative, Informative and Entertaining Stuff for everyone

  • Home
  • Web Stories
  • Get in touch
  • About
    • Home
    • PHP
    • Page 4
PHP web development

Replace multiple space with single space in PHP

Vinod Ram December 14, 2011 0 Comments

If you want to replace multiple space with single space from a string you can use preg_replace function for this. Refer the below example preg_replace(“!\s+!”,” “,$yourstring); For example $yourstring =…

PHP Symfony web development

How to get symfony project base url in template file

Vinod Ram December 3, 2011 0 Comments

To get the base url of your symfony project , you can use the below in your template file. $sf_request->getUriPrefix().$sf_request->getRelativeUrlRoot() And to get your current app URL. $sf_request->getUriPrefix().$sf_request->getRelativeUrlRoot().$sf_request->getPathInfoPrefix(); Vinod RamVinod…

PHP web development

How to check PHP error before including any file in your script

Vinod Ram February 23, 2011 0 Comments

Suppose you want to include/require any file in your scripts, But before doing so you want to confirm that the included or required file doesn’t contain error. Then in that…

PHP

How to check if requested url exits or not

Vinod Ram February 10, 2011 0 Comments

$requestedUrl = “http://www.example.com/abc.php”; $tags = get_headers($requestedUrl); if(preg_match(“/Not Found/i”,$tags) || preg_match(“/Service Unavailable/i”,$tags)) { echo “Requested Url does not exists”; } else { echo “Requested Url exists”; } Vinod RamVinod Ram has…

PHP

export data to excel file (.xls format)

Vinod Ram July 31, 2010 0 Comments

By using the below code you can export your data from the database to excel file. When you run the below code, the excel file get generated and get downloaded…

PHP

GD support

Vinod Ram July 11, 2009 1 Comments

How to check if GD support is enabled or not. <?php var_dump(gd_info()); ?> If GD support is enabled then you will get an array in that you will get “GD…

PHP

Calculate no of years,month,days,hours,minutes and seconds past since given date

Vinod Ram January 10, 2009 0 Comments

function getYMDHMSPastFromTwoDate($startTimeStamp,$endTimeStamp) { $years = ”; $Month = ”; $Days = ”; $Hrs = ”; $Mins = ”; $totalSecs = ”; $timePastArr = array(); $date1 = $startTimeStamp; $date2 = $endTimeStamp;…

Posts navigation

1 … 3 4

« Previous Page

Tags

amazon amazon on strike 2024 Anita Bryant Australia bitcoin content Cricket date date validation David Dobrik Death in Paradise delivery Staff donald trumph form validation France gateway timeout Hollywood htaccess javascript jquery Karate laravel Melbourne Cricket Ground microsoft movie Muay Thai Murielle Hilaire netflix ninja form Notre-Dame fire online Shopping Paris php-fpm Singer squid game Stardom suspense Sydney Sweeney thriller usa politics validation website development wordpress yii2 youtuber

Archives

You Missed

General Knowledge International News

Microsoft Makes OpenAI’s $200/Month AI Free for All Copilot Users

General Knowledge International News

अमेरिका-चीन व्यापार युद्ध बढ़ा: नए टैरिफ और जवाबी उपायों से वैश्विक बाजार में उथल-पुथल

International News

Dick Button The Trailblazer Who Revolutionised Figure Skating

Hollywood International News

Selena Gomez was criticised for posting a tearful video on Instagram

Vinod Ram Blog

Creative, Informative and Entertaining Stuff for everyone

Copyright © All rights reserved | Blogus by Themeansar.

  • Terms and Condition
  • Disclaimer
  • Privacy Policy
  • Get in touch