InimistTech Blogs

Web & Mobile App Tech Weblog

  • Home
  • Laravel
  • React
  • Javascript
  • Linux
  • PHP
  • git
  • WordPress
  • Hindi to Unicode

Category: PHP

How to Get Start & End dates of a Week by given Date

Arvind KumarPHP2 Comments on How to Get Start & End dates of a Week by given Date
A simple way to debug a php application in production mode

The following function gets start and end date of a week for a given date supplied in valid date string format. In the following function $week is the number of week in the year. For example the current week is…

Read More→

How to know whether a file exists in URL using PHP

Arvind KumarPHPLeave a Comment on How to know whether a file exists in URL using PHP

In PHP, to find whether a file exists in disk or on server we have: if(file_exists($filepath)) However is there a way to know whether a file exists in an url, such as, https://www.google.co.in/images/nav_logo242.png?

Create pdf preview thumbnail using php

Arvind KumarPHPLeave a Comment on Create pdf preview thumbnail using php

Following the stackoverlow answer http://goo.gl/z9IWCB I did everything correct as mentioned in the answer to create pdf preview thumbnail using php but I struck with an error as such as this. error no decode delegate for this image format `\path\filename.pdf’…

Read More→

Fully-formatted Time Difference between two Dates

Arvind KumarPHPLeave a Comment on Fully-formatted Time Difference between two Dates
A simple way to debug a php application in production mode

An useful php function to calculate a time difference between two dates given in sql format. If the newer date is not passed as second argument it would calculate the different between the old date and current time. So it…

Read More→

Create php array from select options

Arvind KumarPHPLeave a Comment on Create php array from select options
A simple way to debug a php application in production mode

There are many ways to create a dropdown select options list from a given array in any programming language like PHP. Please check how to create a select list from a PHP array. However in this case I will make…

Read More→

Useful PHP debug functions

Arvind KumarPHPLeave a Comment on Useful PHP debug functions
A simple way to debug a php application in production mode

Here are a few useful PHP debug functions. I wrote a similar post sometime ago posting the abbreviated “pr” function as a shorthand replacement for the “prinr_r” or “var_dump” functions. Since then this function has changed a bit so re-posting…

Read More→

To print the table structure of MySQL table in PHP

Arvind KumarMySQL, PHPLeave a Comment on To print the table structure of MySQL table in PHP
A simple way to debug a php application in production mode

You can print the table structure of MySQL table in PHP using simple php script. All you need to do is to make a ‘describe table’ call and process it using php script, similar to one you use to print…

Read More→

PHP – Fix apostrophe(‘) converting to entity &#039 in csv export

Arvind KumarPHPLeave a Comment on PHP – Fix apostrophe(‘) converting to entity &#039 in csv export

1) If you read a .csv file for download: use \xEF\xBB\xBF after headers and just before you echo file data. For example: echo “\xEF\xBB\xBF”; // UTF-8 BOM readfile($file); 2) If you echo per line use htmlspecialchars_decode to covert single and…

Read More→

How to get file extension using PHP

Arvind KumarPHPLeave a Comment on How to get file extension using PHP
A simple way to debug a php application in production mode

A simple yet powerful approach to get file extension using PHP. We usually need to extract file extension from file name while uploading file so that we could generate new name and rename file to our convenience. We could create…

Read More→

Useful php debug function to output data with line number

Arvind KumarPHP1 Comment on Useful php debug function to output data with line number
A simple way to debug a php application in production mode

A very useful php debug function i like to use to print debug output to browser window. In some cases where i may not output the debug to browser window i use the same php debug function to receive debug…

Read More→

Posts navigation

Previous 1 … 4 5 6 … 8 Next
  • Useful Linux Commands
  • Enlighter Example - CSS
  • Disk Space Usage Commands
  • Top Directory Linux commands

Recent Posts

  • Build Reusable Components in React
  • Introduction to Node.js for Beginners
  • Getting Started with the MERN Stack: A Beginner’s Guide
  • Introduction to Node.js for Beginners
  • How to Modify WooCommerce Templates

About Arvind

Arvind Thakur is a Full Stack Web Developer. He founded and runs a Software Development company by the name Inimist Technologies in Chandigarh, India. >> know more
Copyright © All rights reserved.
Blog Kit by WP Charms
Facebook
fb-share-icon
LinkedIn
Share
WhatsApp
Follow by Email
Twitter
Post on X
Reddit
Pinterest
Instagram
RSS
Telegram