0

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/>
)
)
3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by diafol
0

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');
0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.