Answer the question
In order to leave comments, you need to log in
Why am I getting an error when trying to get the value of a foreach index?
Hello! There is a foreach loop on the wordpress site that displays a list<input type="radio">
foreach ( $args['options'] as $option_key => $option_text ) {
$field .= '<input type="radio"' . checked( $value, esc_attr( $option_text ), false ) . ' name="' . esc_attr( $key ) . '" value="' . esc_attr( $option_text ) . '" /><label>' . esc_html( $option_text ) . '</label>';
}
foreach ( $args['options'] as $option_key => $option_text ) {
$field .= '<input type="radio" id=""'. echo $option_key . '"' . checked( $value, esc_attr( $option_text ), false ) . ' name="' . esc_attr( $key ) . '" value="' . esc_attr( $option_text ) . '" /><label>' . esc_html( $option_text ) . '</label>';
}
Answer the question
In order to leave comments, you need to log in
PHP GD2 library:
$img = imagecreatefrompng('path to image'); // open a png image, other formats are
also possible imagestring( ); // look at parameters at php.net/manual/en/book.image.php
imagepng($img, 'image name');
imagedestroy($img);
If on js:
first find out the link path itself elem.getAttribute("href");
then you change this value using regular expressions and
elem.setAttribute(name, value) - sets the attribute
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question