Letter Spacing Using CSS

AmitDiwan
Updated on 26-Dec-2019 11:10:58

109 Views

To set space between letters i.e. characters, use the letter-spacing property. Following are the property values −letter-spacing: normal|length|initial|inherit;Example Live Demo p.demo1 {    letter-spacing: 1px; } p.demo2 {    letter-spacing: 10px; } Demo Heading Heading2 This is demo text. Heading2 This is demo text. OutputExampleLet us now see another example − Live Demo p.demo1 {    letter-spacing: 1cm; } p.demo2 {    letter-spacing: -2px; } Demo Heading Heading2 This is demo text. Heading2 This is demo text. Output

Generating Random String Using PHP

AmitDiwan
Updated on 26-Dec-2019 10:39:42

363 Views

To generate random string using PHP, the code is as follows−Example Live DemoOutputThis will produce the following output−Displaying random string... 1c856ExampleLet us now see another example − Live DemoOutputThis will produce the following output−Displaying random string... a3541 Displaying another random string... 335b83d9e9

decbin Function in PHP

karthikeya Boyini
Updated on 26-Dec-2019 10:38:57

133 Views

The decbin() function converts a decimal number to binary number.Syntaxdecbin(num)Parametersnum − Specifies a number to be converted to binary.ReturnThe decbin() function Returns a string representing the binary number of the decimal value.Example Live DemoOutput111100011001ExampleLet us see another example − Live DemoOutput1100011

Access Associative Array by Integer Index in PHP

AmitDiwan
Updated on 26-Dec-2019 10:37:25

504 Views

To access an associative array by integer index in PHP, the code is as follows−Example Live DemoOutputThis will produce the following output−Array key and value... key: p, value: 150 key: q, value: 100 key: r, value: 120 key: s, value: 110ExampleLet us now see another example− Live DemoOutputThis will produce the following output−Array key and value... key: p, value: 150 key: q, value: 100 key: r, value: 120 key: s, value: 110 Updated Array key and value...  key: p, value: 150 key: q, value: 100 key: r, value: 20 key: s, value: 10

Cosh Function in PHP

Samual Sam
Updated on 26-Dec-2019 10:35:17

161 Views

The cosh() function Returns the hyperbolic cosine of a number. The value Returned is a floating point number.Syntaxcosh(num)Parametersnum − Specifies a number in radiansReturnThe cosh() function Returns the hyperbolic cosine of a number. The value Returned is a floating point number.Example Live DemoOutput1.54308063481521.5430806348152ExampleLet us see another example − Live DemoOutput1Example Live DemoOutput11.591953275522267.74676148375

Check Whether an Array is Empty Using PHP

AmitDiwan
Updated on 26-Dec-2019 10:34:39

208 Views

To check whether an array is empty, the code is as follows in PHP−Example Live Demo

Cos Function in PHP

karthikeya Boyini
Updated on 26-Dec-2019 10:34:00

136 Views

The cos() function Returns the cosine of a number. A numeric value between -1 and 1 is Returned representing the cosine of the angle.Syntaxcos(num)Parametersnum − The specified value in radiansReturnThe cos() function Returns cosine of a number in float. A numeric value between -1 and 1 is Returned representing the cosine of the angle.Example Live DemoOutput0.540302305868140.54030230586814ExampleLet us see another example − Live DemoOutput1

Create a Copy of an Object in PHP

AmitDiwan
Updated on 26-Dec-2019 10:33:37

126 Views

To create a copy of an object in PHP, the code is as follows−Example Live DemoOutputThis will produce the following output−JackKevin TomRyanExampleLet us now see another example − Live DemoOutputThis will produce the following output−Demo Object(    [deptname] => Finance    [deptzone] => West ) Demo Object(    [deptname] => Finance    [deptzone] => West )

Ceil Function in PHP

Samual Sam
Updated on 26-Dec-2019 10:32:49

309 Views

The ceil() function rounds a number to the nearest integer. The value is rounded up to the nearest greatest integer.Syntaxceil(num)Parametersnum − The number to round upReturnThe ceil() function Returns the value rounded up to the nearest (up) integer.Example Live DemoOutput11ExampleLet us see another example − Live DemoOutput2ExampleLet us see another example − Live DemoOutput9-9

Base Convert Function in PHP

Samual Sam
Updated on 26-Dec-2019 10:31:17

136 Views

The base_convert() function converts a number from one base to another, for example, octal number to decimal number. The base mentioned here should be between 2 and 36. Digits in numbers with a base greater than 10 is represented with the letters a-z i.e a is 10, , d is 13, z is 35, etc.Syntaxbase_convert(num, original_base, to_base)Parametersnum − The number to convertoriginal_base − The original base. The base mentioned here should be between 2 and 36. Digits in numbers with a base greater than 10 is represented with the letters a-z i.e a is 10, , d is 13, z ... Read More

Advertisements