
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1060 Articles for PHP

321 Views
The number_format() function is used to format a number with grouped thousands.Syntaxnumber_format(num,decimals,decimal_pt,separator)Parametersnum − The number to be formatted.decimals − Specifies how many decimals.decimal_pt − The string to be used for decimal point.separator − Specifies the string to be used for thousands separator.ReturnThe number_format() function returns the formatted number.ExampleThe following is an example − Live DemoOutputThe following is the output −10,000,000ExampleLet us see another example − Live DemoOutputThe following is the output −4,000

94 Views
The nl_langinfo() function has contained information about language and locale. Note − This function won’t work on Windows. Syntax nl_langinfo(ele) Parameters ele − Specify what element to return. Should be any of the following elements − Time and Calendar − ABDAY_(1-7) - Abbreviated name of the numbered day of the week DAY_(1-7) - Name of the numbered day of the week (DAY_1 = Sunday) ABMON_(1-12) - Abbreviated name of the numbered month of the year MON_(1-12) - Name of the numbered month of the year AM_STR - String for Ante meridian PM_STR - String for Post ... Read More

326 Views
The explode() function is used to split a string by string.Syntaxexplode(delimiter, str, limit)Parametersdelimiter − The boundary stringstr − String to splitlimit − Specifies the number of array elements to return.The following are 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 elementReturnThe explode() function returns an array of strings.The following is an example −Example Live DemoThe following is the output −OutputArray ( [0] => This [1] => is [2] => demo [3] => ... Read More

106 Views
The convert_cyr_string() function is used to convert from one Cyrillic character set to another. The supported Cyrillic character-sets are − k - koi8-r w - windows-1251 i - iso8859-5 a - x-cp866 d - x-cp866 m - x-mac-cyrillic Syntax convert_cyr_string(str, from, to) Parameters str − String to format from − The source Cyrillic character set, as a single character. to − The destination Cyrillic character set, as a single character. Return The convert_cyr_string() function returns the converted string. The following is an example − Example Live Demo ... Read More

55 Views
The timezone_name_get() function returns the name of the timezone.Syntaxtimezone_name_get(obj)Parametersobj − A DateTimeZone object.ReturnThe timezone_name_get() function returns array on success or FALSE on failure.ExampleThe following is an example − Live DemoOutputThe following is the output −Europe/Paris

74 Views
The date_time_set() function sets the time. It returns a DateTime object on success. FALSE on failure.Syntaxdate_time_set(obj, hour, minute, second)Parametersobj − DateTime objecthour − Hour of the time to setminute − Minute of the time to setsecond − Second of the time to setReturnThe date_time_set() function returns a DateTime object on success. FALSE on failure.ExampleThe following is an example − Live DemoOutputThe following is the output −2018-09-05 08:15:00ExampleLet us see another example − Live DemoOutputThe following is the output −2017-08-08 13:24:00

149 Views
The call_user_method() function call a user method on an specific object. Note − The function is deprecated now. Syntax call_user_method(method, obj, params) Parameters method − Method name obj − Object that method is being called on. params − Array of parameters Alternative Since the call_user_method() deprecated in PHP 4.1.0, and removed in PHP 7.0, therefore use the following as an alternative solution − call_user_func(array($obj, $method), $params);

47 Views
The JDMonthName() method returns a month name.Syntaxjdmonthname(julian_day, mode)Parametersjulian_day − A julian day numbermode − Specifies which calendar to convert the Julian Day Count to, and what type of month names is to be returned−0 - Gregorian abbreviated form (Jan, Feb, Mar, etc.)1 - Gregorian (January, February, March, etc.)2 - Julian - abbreviated form (Jan, Feb, Mar, etc.)3 - Julian (January, February, March, etc.)4 - Jewish (Tishri, Heshvan, Kislev, etc.)5 - French Republican (Vendemiaire, Brumaire, Frimaire, etc.)ReturnThe JDMonthName() function returns the month name for the specified Julian Day and calendar.ExampleThe following is an example − Live DemoOutputAug Read More

64 Views
The cal_to_jd() function converts a date to Julian day count. It returns a Julian day number.Syntaxcal_to_jd(calendar, month, day, year)Parameterscalendar − The calendar to convert from. Possible values −CAL_GREGORIANCAL_JULIANCAL_JEWISHCAL_FRENCHmonth − Set the month as a number.day − Set the day as a number.year − Set the year as a number.ReturnThe cal_to_jd() function returns a Julian day number.ExampleThe following is an example − Live DemoOutput2458407

1K+ Views
The get_object_var() function gets the properties of the given object. It returns an associative array of defined object properties for the specified object.Syntaxget_object_vars(object)Parametersobject − An object instance.ReturnThe get_object_var() function returns an associative array of defined object properties for the specified object. If a property have not been assigned a value, it will be returned with a NULL value.ExampleThe following is an example − Live DemoOutputThe following is the output −Array ( [x] => 9.675 [y] => 8.321 [label] => ) Array ( [x] => 9.675 [y] => 8.321 [label] => point #1 )