Reformat data within a nested array

A quick solution would be to change this: //rename the array keys foreach( $data as &$new_values ) { $new_values[‘user_id’] = $new_values[0]; unset( $new_values[0] ); $new_values[‘product_id’] = $new_values[1]; unset( $new_values[1] ); } Into this: //rename the array keys foreach( $data as &$new_values ) { $new_values[‘user_id’] = (string) $new_values[0]; unset( $new_values[0] ); $new_values[‘product_id’] = (string) $new_values[1]; unset( … Read more

My custom theme text and content format

Themes can optionally use TinyMCE editor stylesheets via add_editor_style(). If properly implemented, editor styles will do a pretty good job at making the contents of the editor look the same way as content rendered on the front end of the site. Without editor styles, TinyMCE will use very basic styles which will not match the … Read more

Paste from word not preserving formatting

Pasting from Office to WordPress is never a clean experience. There are two options: paste as you’re doing and clean up the code later (manually deleting the <strong> </strong> tags and other bugs), or do as Bas Grave suggested and strip all formatting, then use WP to reformat it. The reason is creating more space … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)