Skip to content

Instantly share code, notes, and snippets.

View jibe0123's full-sized avatar
🍔
Eating

Jibé jibe0123

🍔
Eating
  • AB tasty
  • localhost
View GitHub Profile
@jibe0123
jibe0123 / get_string_between.php
Created May 23, 2018 15:28
get_string_between
function get_string_between($string, $start, $end){
$string = ' ' . $string;
$ini = strpos($string, $start);
if ($ini == 0) return '';
$ini += strlen($start);
$len = strpos($string, $end, $ini) - $ini;
return substr($string, $ini, $len);
}
{%- block choice_widget -%}
{% if expanded %}
{% if attr.isInline is defined and attr.isInline %}
{{- block('choice_widget_expanded_inline') -}}
{% elseif attr.isCheckbox is defined and attr.isCheckbox %}
{{- block('choice_widget_expanded_checkbox') -}}
{% else %}
{{- block('choice_widget_expanded') -}}
{% endif %}
{% else %}