Hi,
I’m using Languagetool API and trying to make a same UI(Editor) as of LT by using PHP. I have colored the first letter of wrong alphabet or grammar, even its replacing with wrong alphabet. And even showing those all replacements altogether once in the context-menu. I want to show specific replacements according to the specific word.
Through this code I’m getting replacements:
foreach ($json2['matches'] as $key=>$val) { //$json2 is getting API result.
foreach ($val['replacements'] as $new=>$qwe) {
echo '<input type="button" value="'.$qwe['value'].'">';
}
}
This is my current result:
Please let me know if I can get the position of each replacement according to its word in PHP.
Thanks