My conjugation script combines $stamm(2)
with all endings from the 2 dimensional array called $array
.
part of a foreach loop
$array[3][0] = str_replace($stamm, $stamm2.'o</u>', $value). $red_slash.str_replace($stamm, $stamm2.'ié</u>', $value);
for example
$stamm2='begin';
$stamm3='begin2';
$array[3][0] = array ('irai','iras','ira','irons','irez','iront');
Now I have a case with 2 different regular verb forms with different roots ($stamm2
and $stamm3
) but also different endings ($array[3][0]
).
In the second option should be everytime the first ending letter i deleted.
How is it possible to add substr function or something else what would help me for this part?
str_replace($stamm, $stamm2.'ié</u>', $value);
output: (without the adding the strings o/ié to $stamm2
/$stamm3
)
beginirai / begin2irai
beginiras / begin2iras
beginira / begin2ira
beginirons / begin2irons
beginirez / begin2irez
beginiront / begin2iront
desired output: (without the adding the strings o/ié to $stamm2
/$stamm3
)
beginirai / begin2rai
beginiras / begin2ras
beginira / begin2ra
beginirons / begin2rons
beginirez / begin2rez
beginiront / begin2ront