hey guys, how to bold or strong value (string) array 2 D below??
Array
(
[0] => Array
(
[0] => <b>abcd<b/>
[1] => <b>efgh<b/>
)
[1] => Array
(
[18] => <b>ijkl<b/>
[19] => <b>mnop<b/>
)
[2] => Array
(
[28] => <b>qrst<b/>
[29] => <b>uvwx<b/>
)
)
hey guys, how to bold or strong value (string) array 2 D below??
Array
(
[0] => Array
(
[0] => <b>abcd<b/>
[1] => <b>efgh<b/>
)
[1] => Array
(
[18] => <b>ijkl<b/>
[19] => <b>mnop<b/>
)
[2] => Array
(
[28] => <b>qrst<b/>
[29] => <b>uvwx<b/>
)
)
If you want to place <b> tags around every element in your array, you can use the following:
<?php
function makeBold(&$input)
{
// The & sign is used to make live changes to the input value.
$input = '<b>' . $input . '</b>';
}
// Execute the function for every element in every dimension of your array.
array_walk_recursive($your_array, 'makeBold');
Need more info. What are you doing with the array items? It may be easier to just <b> them as they're popped out!
Just a side note - maybe have a look at <b> and <strong> here: http://html5doctor.com/i-b-em-strong-element/ . They've changed slightly since HTML4.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.